设为首页 加入收藏

TOP

站内搜索脚本例子四(JavaScript)
2011-05-31 18:08:50 来源: 作者: 【 】 浏览:615次 评论:0
脚本说明:
第一步:把如下代码加入<body>区域中
<form name="database">
<input type="hidden" name="list" value='http://www.webcrawler.com~Webcrawler|keywords for first file go
here separated by spaces^A great search engine from the makers of AOL!*http://java2000.126.com~java2000
collections|java javascript search html download cgi perl dhtml games activex 下载 脚本^coolest java and
javascript collections for internet surfers to enhance web page!
*http://www.javagoodies.com/~javagoodies|ActiveX ASP C/C++ CGI Databases java javascript^coolest
javagoodies!*'>
</form>
<p>
<script language="JavaScript">
<!--
version = 1.0;
// -->
</script>
<script language="JavaScript1.1">
<!--
version = 1.1;
// -->
</script>
<script language="JavaScript">
<!--
// When set to true, searching for "fun*y" matches in the string "fun sky".
// (it will also match the string "fun and here is some long dummy text for you"
// which is obviously not what they were looking for, so we suggest you set
// match_across_word_boundaries to false)
// When set to false, the * operator will not match across word boundaries so
// the above example will not match.
match_across_word_boundaries = false; // false is suggested strongly
// ************ NO NEED TO MODIFY ANYTHING BELOW THIS POINT ************
function Page(url,title,keywords) {
while ((url.length > 0) && (url.charAt(0) == " ")) {
url = url.substring(1,url.length);
}
this.url = url;
while ((title.length > 0) && (title.charAt(0) == " ")) {
title = title.substring(1,title.length);
}
this.title = title;
this.keywords = keywords;
return this;
}
您看到此篇文章时的感受是:
Tags: 责任编辑:administrator
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到QQ空间
分享到: 
上一篇站内搜索脚本例子三(JavaScript) 下一篇站内搜索脚本例子五(JavaScript)

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

相关栏目

最新文章

图片主题

热门文章

推荐文章

相关文章

广告位