الكود :
<--xx-- language="--xx--"> <!-- current_site = "Yahoo" var set_def = false function fetch() { if (set_def == true) { set_default = "t" }else{ set_default = "" } tmp = document.SearchForm.Search.value; stmp = ""; for (i=0 ; i <= tmp.length ; i++) { if (tmp.charAt(i) == " ") { stmp = stmp + "+"; } else { stmp = stmp + tmp.charAt(i); } } if (current_site == "Yahoo") { top.location.href = "http://search.yahoo.com/bin/search?p=" + document.SearchForm.Search.value } if (current_site == "AltaVista") { top.location.href = "http://altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=.&q=" + document.SearchForm.Search.value } if (current_site == "Lycos") { top.location.href = "http://www.lycos.com/cgi-bin/pursuit?adv=%26adv%3B&cat=lycos&matchmode=and&query=" + document.SearchForm.Search.value + "&x=35&y=2" } if (current_site == "Excite") { top.location.href = "http://www.excite.com/search.gw?c=web&search=" + document.SearchForm.Search.value + "&trace=a&x=31&y=20" } if (current_site == "Infoseek") { top.location.href = "http://www.infoseek.com/Titles?qt=" + document.SearchForm.Search.value + "&col=WW&sv=IS&lk=noframes&nh=10" } if (current_site == "HotBot") { top.location.href = "http://www.hotbot.com/?SW=web&SM=MC&MT=" + document.SearchForm.Search.value + "&DC=10&DE=2&RG=NA&_v=2&act.search.x=87&act.search.y=9" } return false; } function toggle_setdef() { set_def = !(set_def); } function setsite(sitenow) { current_site = sitenow; } // --></--xx--> <!-- A1 --> <center><h1>Multiple Search Engines</h1></center> <form method="GET" name="SearchForm" NOOP="return fetch()"> <center><font size="-1">Yahoo</font><input type="radio" name="SITE" value="Yahoo" checked NOOP="setsite('Yahoo')"> <font size="-1">AltaVista</font><input type="radio" name="SITE" value="AltaVista" NOOP="setsite('AltaVista')"> <font size="-1">Lycos</font><input type="radio" name="SITE" value="Lycos" NOOP="setsite('Lycos')"> <font size="-1">Excite</font><input type="radio" name="SITE" value="Excite" NOOP="setsite('Excite')"> <font size="-1">Infoseek</font><input type="radio" name="SITE" value="Infoseek" NOOP="setsite('Infoseek')"> <font size="-1">Hotbot</font><input type="radio" name="SITE" value="HotBot" NOOP="setsite('HotBot')"></center> <br> <center><input type="Text" name="Search" size=30></center> <br> <br> <center><input type="Submit" name="Submit"></center></form><hr> <!-- -->