几个常用搜索引擎代码

来源:互联网 发布:帧数显示软件 编辑:程序博客网 时间:2024/04/30 12:26
<script>
function search4()
{
if(form1.abc6.checked)
   window.open("http://www.google.com/search?hl=zh-CN&lr=lang_zh-CN&q="+form1.key.value,"mspg6");
if(form1.abc9.checked)
   window.open("http://www1.baidu.com/baidu?tn=site5566&word="+form1.key.value,"mspg9");
if(form1.abc0.checked)
   window.open("http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+form1.key.value,"mspg0");
if(form1.abc4.checked)
   window.open("http://cns.3721.com/cns.dll?name="+form1.key.value,"mspg4");
if(form1.abc5.checked)
   window.open("http://search.yahoo.com/bin/search?p="+form1.key.value,"mspg5");
return false;  

}
</script>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><form name="form1" onsubmit="return(search4())">
      <p><input type="text" name="key" size="12"><input type="checkbox" name="abc6"
      value="google" checked>Google <input type="checkbox" name="abc9" value="baidu" checked>百度 <input type="checkbox" name="abc0" value="sina">新浪
      <input type="checkbox" name="abc4" value="3721">3721 <input
      type="checkbox" name="abc5" value="yahooe">Yahoo <input
      type="submit" value="搜索" name="B1" style="{font-size:12px;background:#cccccc;}"> </p>   
    </td></form>
    <td>
  </tr>
  <tr><td colspan="2" height="7"></td></tr>
</table>(完)
<script src="http://cpro.baidu.com/cpro/ui/ui.js" type="text/javascript"> </script>