船长 发表于 2009-03-04 10:52 | 分类:javascript | 阅读数:761 次
google站内搜索代码,利用以下代码可以在自己的站点中添加google站内搜索功能
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> New Document </title> </head> <body> <script type="text/javascript"> //Enter domain of site to search. var domainroot="www.songlecn.com" function Gsitesearch(curobj){ curobj.q.value="site:"+domainroot+" "+curobj.qfront.value } </script> <form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)"> <p>Search songlecn.com:<br /> <input name="q" type="hidden" /> <input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /></p> </form> </body> </html>
提示:你可以先修改部分代码再运行。
您的网名: * 必填
电子邮件: * 绝不会泄露
个人主页:
评论内容:
(Ctrl+Enter快捷回复)
web集结号致力于