各种在线搜索代码集合
作者:admin 日期:2008-07-03
一个在UTF-8下无乱码现象的搜索代码.预览地址:
http://www.54ny.com.cn/download/index.html
程序代码
http://www.54ny.com.cn/download/index.html
程序代码<!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" />
<title>各种搜索集合</title>
</head>
<body>
<script>
<!--//Begin JavaScript Source
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
function netsearch(formname)
{
var Sina1
var Sina2
var Sohu1
var Sohu2
var Netease1
var Netease2
var baidu1
var baidu2
var mp31
var mp32
var sbox1
var sbox2
var flash1
var flash2
var YahooC1
var YahooC2
var Google1
var Google2
var tom1
var tom2
var TEXT
var noENGINE
var haveTEXT
TEXT=formname.TEXT.value;
noEngine=true;
haveTEXT=true;
if (TEXT=="")
{
alert("请输入搜索内容!")
haveTEXT=false
}
Sina1=formname.Sina.checked;
Sina2="http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+TEXT;
if (Sina1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Sina2, "Sina","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Sohu1=formname.Sohu.checked;
Sohu2="http://site.search.sohu.com/sitesearch.jsp?key_word="+TEXT;
if (Sohu1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Sohu2, "Sohu","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Netease1=formname.Netease.checked;
Netease2="http://nisearch.163.com/Search?q="+TEXT;
if (Netease1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Netease2, "Netease","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
baidu1=formname.baidu.checked;
baidu2="http://www1.baidu.com/baidu?myselectvalue=0&tn=net900&word="+TEXT;
if (baidu1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(baidu2, "baidu","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
mp31=formname.mp3.checked;
mp32="http://mp3search.baidu.com/wstsearch?tn=baidump3&ct=134217728&word="+TEXT;
if (mp31)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(mp32, "mp3","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
YahooC1=formname.YahooC.checked;
YahooC2="http://cn.search.yahoo.com/search/cn?p="+TEXT;
if (YahooC1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(YahooC2, "YahooC", "toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Google1=formname.Google.checked;
Google2="http://www.google.com/search?hl=zh-CN&q="+TEXT;
if (Google1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Google2, "n","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
sbox1=formname.sbox.checked;
sbox2="http://www.yahoo.com.cn/search?pid=1073_1006&needbid=&ei=GBK&source=3721_union&p="+TEXT;
if (sbox1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(sbox2, "sbox","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
tom1=formname.tom.checked;
tom2="http://sms2.ctn.com.cn/smslist/smsearch.php?user_id=67&inc=3&keyword="+TEXT;
if (tom1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(tom2, "tom","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
flash1=formname.flash.checked;
flash2="http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&lm=6&word="+TEXT;
if (flash1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(flash2, "flash","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
if (noEngine)
{
alert("请选择搜索引擎!")
}
}
//End JavaScript Source -->
</script>
<table style='width:705px; background-color: #FFFF00; layer-background-color: #CCCCCC; border: 1px none #000000' id="table1"><tr><td><font style='FONT-SIZE:9pt'>集成搜索</td><td><form name=engines onSubmit=netsearch(engines)><input style='background-color: FDF3D1; border: 1px solid #FBB723' name=TEXT size=10 maxlength=200 value=> <input type=button style='BACKGROUND-COLOR:#ffffff;BORDER-BOTTOM:red 1px solid;BORDER-LEFT:red 1px solid;BORDER-RIGHT:red 1px solid;BORDER-TOP:red 1px solid;COLOR:#000000;FONT-SIZE:9pt' value=搜索 name=Submit onClick=netsearch(engines)><font style='FONT-SIZE:9pt'> <input type=Checkbox name=baidu checked>百度<input type=Checkbox name=Google checked>Google<input type=Checkbox name=YahooC>雅虎<input type=Checkbox name=Sina>新浪<input type=Checkbox name=Sohu>搜狐<input type=Checkbox name=Netease>网易<input type=Checkbox name=sbox>Yahoo<input type=Checkbox name=tom>手机铃声<input type=Checkbox name=flash>FLASH<input type=Checkbox name=mp3>MP3</font></td></form></tr></table>
<p>
</font>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>各种搜索集合</title>
</head>
<body>
<script>
<!--//Begin JavaScript Source
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
function netsearch(formname)
{
var Sina1
var Sina2
var Sohu1
var Sohu2
var Netease1
var Netease2
var baidu1
var baidu2
var mp31
var mp32
var sbox1
var sbox2
var flash1
var flash2
var YahooC1
var YahooC2
var Google1
var Google2
var tom1
var tom2
var TEXT
var noENGINE
var haveTEXT
TEXT=formname.TEXT.value;
noEngine=true;
haveTEXT=true;
if (TEXT=="")
{
alert("请输入搜索内容!")
haveTEXT=false
}
Sina1=formname.Sina.checked;
Sina2="http://search.sina.com.cn/cgi-bin/search/search.cgi?_searchkey="+TEXT;
if (Sina1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Sina2, "Sina","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Sohu1=formname.Sohu.checked;
Sohu2="http://site.search.sohu.com/sitesearch.jsp?key_word="+TEXT;
if (Sohu1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Sohu2, "Sohu","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Netease1=formname.Netease.checked;
Netease2="http://nisearch.163.com/Search?q="+TEXT;
if (Netease1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Netease2, "Netease","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
baidu1=formname.baidu.checked;
baidu2="http://www1.baidu.com/baidu?myselectvalue=0&tn=net900&word="+TEXT;
if (baidu1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(baidu2, "baidu","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
mp31=formname.mp3.checked;
mp32="http://mp3search.baidu.com/wstsearch?tn=baidump3&ct=134217728&word="+TEXT;
if (mp31)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(mp32, "mp3","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
YahooC1=formname.YahooC.checked;
YahooC2="http://cn.search.yahoo.com/search/cn?p="+TEXT;
if (YahooC1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(YahooC2, "YahooC", "toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
Google1=formname.Google.checked;
Google2="http://www.google.com/search?hl=zh-CN&q="+TEXT;
if (Google1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(Google2, "n","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
sbox1=formname.sbox.checked;
sbox2="http://www.yahoo.com.cn/search?pid=1073_1006&needbid=&ei=GBK&source=3721_union&p="+TEXT;
if (sbox1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(sbox2, "sbox","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
tom1=formname.tom.checked;
tom2="http://sms2.ctn.com.cn/smslist/smsearch.php?user_id=67&inc=3&keyword="+TEXT;
if (tom1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(tom2, "tom","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
flash1=formname.flash.checked;
flash2="http://mp3.baidu.com/m?f=ms&tn=baidump3&ct=134217728&lf=&rn=&lm=6&word="+TEXT;
if (flash1)
{
noEngine=false
if (haveTEXT)
{
newWindow=window.open(flash2, "flash","toolbar,location,directories,status,menubar,scrollbars,resizable=1")
}
}
if (noEngine)
{
alert("请选择搜索引擎!")
}
}
//End JavaScript Source -->
</script>
<table style='width:705px; background-color: #FFFF00; layer-background-color: #CCCCCC; border: 1px none #000000' id="table1"><tr><td><font style='FONT-SIZE:9pt'>集成搜索</td><td><form name=engines onSubmit=netsearch(engines)><input style='background-color: FDF3D1; border: 1px solid #FBB723' name=TEXT size=10 maxlength=200 value=> <input type=button style='BACKGROUND-COLOR:#ffffff;BORDER-BOTTOM:red 1px solid;BORDER-LEFT:red 1px solid;BORDER-RIGHT:red 1px solid;BORDER-TOP:red 1px solid;COLOR:#000000;FONT-SIZE:9pt' value=搜索 name=Submit onClick=netsearch(engines)><font style='FONT-SIZE:9pt'> <input type=Checkbox name=baidu checked>百度<input type=Checkbox name=Google checked>Google<input type=Checkbox name=YahooC>雅虎<input type=Checkbox name=Sina>新浪<input type=Checkbox name=Sohu>搜狐<input type=Checkbox name=Netease>网易<input type=Checkbox name=sbox>Yahoo<input type=Checkbox name=tom>手机铃声<input type=Checkbox name=flash>FLASH<input type=Checkbox name=mp3>MP3</font></td></form></tr></table>
<p>
</font>
</body>
</html>
评论: 0 | 引用: 0 | 查看次数: -
发表评论
上一篇
下一篇

文章来自:
Tags: