超级搜索引擎 新窗口

chenyajun  2020-01-29 15:29:35  阅读 3306 次 评论 0 条
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language=javascript>
function searchFun(WhoForm,winSign){
e=WhoForm.sq[WhoForm.sq.selectedIndex].value;
k=WhoForm.k.value;
if(k=="" || k=="请输入关键字"){alert("请输入关键词!"); k="";WhoForm.k.focus();return false;}
if(e=="baidu"){SearchURL="http://www1.baidu.com/baidu?word="+k;}
if(e=="google.com"){SearchURL="https://www.google.com/search?q="+k;}
if(e=="so.com"){SearchURL="https://www.so.com/s?q="+k;}
if(e=="sina_cn"){SearchURL="http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+k;}
if(e=="sohu"){SearchURL="http://site.search.sohu.com/website.jsp?key_word="+k;}
if(e=="163com"){SearchURL="http://search.163.com/cgi-bin/search/engine/search.fcgi?key="+k;}
if(e=="tom"){SearchURL="http://web01.baidu.com/baidu?tn=tomds&sr=&bs=&word="+k;}
if(e=="yahoo_tw"){SearchURL="http://tw.search.yahoo.com/search/kimo?p="+k;}
if(e=="yam"){SearchURL="http://dir.yam.com/bin/search?k="+k;}
if(e=="yahoo"){SearchURL="http://search.yahoo.com/bin/search?p="+k;}
if(e=="excite"){SearchURL="http://msxml.excite.com/_1_8WCUI50371NN81__info.xcite/dog/results?otmpl=dog/webresults.htm&qkw="+k;}
if(winSign==0){window.location=SearchURL;}
if(winSign==1){window.open(SearchURL,"_blank");}
return false; 
 }
</script>
<!-- 原文:https://blog.csdn.net/shysky/article/details/182685 -->
<title>超级搜索引擎 新窗口</title>
</head>

<body>
<FORM name="sel"  onSubmit="return searchFun(this,1);">
<INPUT οnclick="Javascript:this.value='';" tabIndex=2 size=10 placeholder="请输入关键字" name=k>
<SELECT class=Input style="WIDTH: 100px"  name=sq>
<OPTION value=baidu selected>百度</OPTION>
<OPTION value=google.com>谷歌</OPTION>
<OPTION value=so.com>360好搜</OPTION>
<OPTION value=sina_cn>中文新浪</OPTION>
<OPTION value=sohu>搜狐</OPTION>
<OPTION value=163com>网易</OPTION>
<OPTION value=tom>tom.com</OPTION>
<OPTION value=yahoo_tw>繁体Yahoo</OPTION>
<OPTION value=yam>(繁体)蕃薯藤</OPTION>
<OPTION value=yahoo>英文Yahoo</OPTION>
<OPTION value=excite>英文excite</OPTION>
</SELECT>
<INPUT style="CURSOR: hand" type=submit value=" 搜 索 " name=login2>
</form>
</body>
</html>


本文地址:https://chenyajun.net/index.php/post/33.html
版权声明:本文为原创文章,版权归 chenyajun 所有,欢迎分享本文,转载请保留出处!

评论已关闭!