Home > Backend Development > PHP Tutorial > Search engine switching code implemented by JS

Search engine switching code implemented by JS

WBOY
Release: 2016-07-25 09:01:16
Original
1207 people have browsed it



function sch(form){
e=document.sel.sq.selectedIndex; //取选定选项的编号
e=document.sel.sq[e].value; //取选定选项的"value"特征值
k=document.sel.k.value; //取搜索关键字
if(document.sel.k.value==""){ //如果没有填入关键字
alert("请输入关键词!"); //则给出提示
document.sel.k.focus(); //将光标移到输入框
return
}
//以下根据选择的内容改变window.location属性,进行本窗口导航
if(e=="yah1"){location="http://search.chinese.yahoo.com/search/gb?p="+k;}
if(e=="yah"){location="http://search.yahoo.com/bin/search?p="+k;}
if(e=="soh1"){location="http://search.sohu.com/cgi-bin/search_main.cgi?txt_keyword="+k+"&page_index=0&catagory=main"}
if(e=="tonghua"){location="http://search.tonghua.com.cn/search?p="+k;}
if(e=="yo1"){location="http://www.goyoyo.com.cn/gyy/guide/gquery%20GB%20"+k+"?"}
if(e=="srsnet"){location="http://www.xibaonpx.com/richina.cgi?query="+k;}
if(e=="网易"){location="http:// www.xibaonpx.com /cgi-bin/search.cgi?key="+k;}
if(e=="whatsite"){location="http:// www.xibaonpx.com /main/search.cgi?keyword="+k+"&start=0&REXP=OR&x=36&y=15"}
if(e=="kimo"){location="http://search.kimo.com.tw/cgi-bin/srchfz.pl?srchcdn=B0&query="+k+"&x=22&y=9"}
if(e=="yam"){location="http://www.yam.com.tw/b5/search?k="+k+"&x=9&y=18"}
if(e=="excite"){location="http://search.excite.com/search.gw?search="+k;}
if(e=="cei"){location="http://infonavi.cei.gov.cn/cgi-bin/searchs.dll?OptionSearchs?Key="+k;}
if(e=="ztw"){location="http://search.bj.cninfo.net/go/infoseek?keyword="+k;}
if(e=="xlw"){location="http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+k;}
if(e=="ssk"){location="http://www.cseek.com/cgi/srchengine.cgi?searchcgi=http%3A%2F%2Fwww.cseek.com%2Fhomepage%2Fcgi%2F&all=yes&sortby=1&searchkey="+k;} }



Search engine switching code implemented by JS_Jinan Psoriasis Hospital ( www.xibaonpx.com )

















Search engine catches everything——



























Jinan Psoriasis Hospital - The most professional web code download website - committed to providing high-quality web code for Chinese webmasters!


  1. Search engine switching code implemented by JS_Jinan Psoriasis Hospital (www.xibaonpx.com)
  2. < font size = "2" height="32">
  3. < input name=k size=14 style="font-family: 宋体; font-size: 9pt; border: 1 solid #000000" tabindex=2>

  4. < ;p>Jinan Psoriasis Hospital - The most professional web code download website - Committed to providing high-quality web pages for Chinese webmasters Code!

  5. Copy code
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template