<a href="javascript:q = "" + (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (!q) q = prompt("Search words", ""); if (q!=null) location="http://www.answers.com/" + escape(q).replace(/ /g, "+"); void 0">Answers.com Search Selected</a>
szebben tördelve (csak a JavaScript rész)
q = ""
+ (window.getSelection
? window.getSelection() // Mozilla
: document.getSelection
? document.getSelection()
: document.selection.createRange().text);
if (!q)
q = prompt("Search words", "");
if (q!=null)
location = "http://search.live.com/results.aspx?q="
+ escape(q).replace(/ /g, "+");
void 0