您好,欢迎来到模板无忧!
登录
注册
收藏
搜索
地图
帮助
模板无忧
网页特效
网页模板
CMS模板
PPT模板
简历模板
网页特效
视频教程
网页图标
字体下载
CMS教程
DivCss
网站制作
网站运营
网络编程
服务器
请选择您需要的素材分类 |
不限分类
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI小聚 能写会画
域名
推荐
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
浏览器特效代码
>
收藏
分享
查看评论
浏览器
演示
把搜索到的链接显示在Textarea框中_浏览器特效
0/5
1
2
3
4
5
查看演示效果
特效Tag:
链接
添加
织梦DedeCMS视频教程
买空间 租服务器 选网硕互联!
无忧站长工具,百度权重一键全查!
把搜索到的链接显示在Textarea框中,您可以先修改部分代码再运行.
<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; } function Database() { var pos = 0; while ((pos1 = amorphous.indexOf("~",pos)) != -1) { pos2 = amorphous.indexOf("|",pos1+1); pos3 = amorphous.indexOf("*",pos2+1); if ((pos2 != -1) && (pos2 < pos3) && (pos3 <= amorphous.indexOf("*",pos))) { this[database_length++] = new Page(amorphous.substring(pos,pos1), amorphous.substring(pos1+1,pos2), amorphous.substring(pos2+1,pos3)); pos = pos3+1; } else { // error reading amorphous database if (pos+30 <= amorphous.length) alert('Error reading in amorphous database around "' + amorphous.substring(pos,pos+30) + '"'); pos = amorphous.indexOf("*",pos) + 1; } } return this; } var array = new Object(); array_length = 0; // Netscape 2 fix var position = new Object(); position_length = 0; // Netscape 2 fix function pattern(str) { array_length = position_length = 0; while ((str.length > 1) && (str.charAt(0) == "*")) { str = str.substring(1,str.length); } while ((str.length > 1) && (str.charAt(str.length-1) == "*")) { str = str.substring(0,str.length-1); } if (str == "*") return "(true)"; if (str.indexOf("*") == -1) { array[array_length++] = str; pat = "(combo.indexOf(array[0]) != -1)"; } else { left = right = 0; pat2 = ""; pat = "(((position[0] = combo.indexOf(array[0])) != -1)"; while ((right = str.indexOf("*",left)) != -1) { array[array_length++] = str.substring(left,right); pat += " && (position["+(position_length)+"] < (position[" +(++position_length)+"] = combo.indexOf(array["+(array_length) +"],position["+(position_length-1)+"]+array["+(array_length-1)+"].length"+")))"; if (!match_across_word_boundaries) pat2 = " && (no_back_up = ((back_up_pos += combo.substring(" +"temp_pos = back_up_pos = position[" +(position_length-1)+"]+array["+(array_length-1)+"].length,position[" + (position_length) + "]).lastIndexOf(' ')) < temp_pos))" + pat2; left = right+1; } array[array_length++] = str.substring(left,str.length); pat += pat2+")"; } return pat; } function search(str) { menu_length = 0; temp = new Object(); temp_length = 0; words_length = 0; words = new Object(); pos = 0; while ((pos = str.indexOf(" ")) != -1 && and_search != "exact") { words[words_length] = str.substring(0,pos); if (words[words_length].length > 0) words_length++; if (str.length == 1) str=""; else str = str.substring(pos+1,str.length); } if (str.length > 0) words[words_length++] = str; for (q=0;q<words_length;q++) { temp_length = 0; str = words[q].toLowerCase(); pattern_string = pattern(str); start_pos = back_up_pos = 0; len = (and_search=="and"&&q>0?menu_length:database_length); for (n=0; n<len; n++) { no_back_up = true; position_length = 0; if (and_search=="and"&&q>0) { combo = (menu[n].title + " " + menu[n].keywords).toLowerCase(); } else { combo = (database[n].title + " " + database[n].keywords).toLowerCase(); } combo = combo.substring(start_pos,combo.length); if (eval(pattern_string)) { // found temp[temp_length++] = (and_search=="and"&&q>0?menu[n]:database[n]); start_pos = 0; } else if (!no_back_up) { // try pattern again in new spot n--; start_pos += back_up_pos+1; } else { // not found start_pos = 0; } } if (and_search!="and" && q>0) { added = 0; for (i=0;i<temp_length;i++) { duplicate = false; for (j=0;j<menu_length&&!duplicate;j++) { if (menu[j] == temp[i]) { duplicate = true; } } if (!duplicate) menu[menu_length+(added++)] = temp[i]; } menu_length += added; } else { for(h=0;h<temp_length;h++) menu[h] = temp[h]; menu_length = temp_length; } } } function entry() { if ((document.entryform.keyword.value.length == 0) || (document.entryform.keyword.value == " ")) { alert("First you must enter a keyword to search for."); return false; } and_search = (document.entryform.and_or.selectedIndex == 0?"and":"or"); if (document.entryform.and_or.selectedIndex == 2) and_search = "exact"; if (version >= 1.1) { search(document.entryform.keyword.value); if (menu_length == 0) menu[menu_length++] = new Page("","Not found!",""); document.display.found.options.length = menu_length; for (n=0; n<menu_length; n++) { if (menu[n].title.length <= 50) document.display.found.options[n].text = menu[n].title; else document.display.found.options[n].text = menu[n].title.substring(0,50); document.display.found.options[n].value = menu[n].url; } } else { location.href = location.pathname + "?" + escape(document.entryform.keyword.value) + (and_search != "or"?"&"+and_search:""); } return false; } function go_there() { sel = document.display.found.selectedIndex; if ((sel != -1) && (document.display.found.options[sel].value.length > 0)) location.href = document.display.found.options[sel].value; } var amorphous = document.database.list.value; temp_str = amorphous.substring(amorphous.length-2,amorphous.length); if (temp_str.indexOf("*") == -1) amorphous += "* "; else amorphous += " "; // amorphous database must have characters after last asterisk database_length = 0; // Netscape 2 fix var database = new Database(); // read in from amorphous database menu_length = 0; // Netscape 2 fix var menu = new Object(); string = ""; and_search = "or"; if (location.search.length > 1) { string = unescape(location.search.substring(1,location.search.length)); pos = 0; while ((pos = string.indexOf('"',pos)) != -1) { string = string.substring(0,pos) + '\\"' + string.substring(pos+1,string.length); pos += 2; } if (string.substring(string.length-4,string.length) == "&and") { string = string.substring(0,string.length-4); and_search = "and"; } else if (string.substring(string.length-6,string.length) == "&exact") { string = string.substring(0,string.length-6); and_search = "exact"; } else if (string.substring(string.length-3,string.length) == "&or") { string = string.substring(0,string.length-3); and_search = "or"; } search(string); } document.write('<form name="entryform" class="pt9" onSubmit="return entry()">' +'Search for: <input type="text" type="pt9" size=15 name="keyword" value="'+string+'"> ' +'<input type="button" class="pt9" value="Search" onClick="entry()"><br><select name="and_or" ' +'size=1><option'+(and_search=="and"?" selected":"")+'>AND查询 ' +'(AND)<option'+(and_search=="or"?" selected":"")+'>OR查询 ' +'(OR)<option'+(and_search=="exact"?" selected":"")+'>完全' +'匹配</select><br>""可以使用通配符</form><br>' +'<form name="display"><select name="found" size=5>\n'); for (n=0; n<menu_length; n++) document.write('<option value="'+menu[n].url+'">'+menu[n].title+'\n'); if ((menu_length == 0) && (location.search.length <= 1)) document.write('<option value="" class="pt9">Enter a search keyword above\n'); else if ((menu_length == 0) && (location.search.length > 1)) document.write('<option value="">关键字"' +location.search.substring(1,location.search.length)+'"没有发现!\n'); document.write('</select><br><input type="button" class="pt9" onClick="go_there()" ' +'value=" Go There "></form>'); // --> </script>
所属频道:
浏览器特效
/
更新时间:2012-11-30
[收藏]
[报错]
[返回列表]
评论加载中....
相关
浏览器特效
:
JS判断客户端使用的访问设备并加载对应CSS
对输入文本框的内容作出检测
对链连接进行确认还能给出有关提示
检测浏览器去过站点
集成Cookies :能在页面显示用户的很多信息
显示随来访次数信息
禁用鼠标右键:禁用鼠标右键功能
离开页面,提示用户把本页添加到收藏夹
禁用鼠标左键:禁用鼠标左键功能
签名提示程序:提示用户签到,并在页面给出欢迎语
标题栏里的打字效果
检测出用户的IE浏览器所装插件数
浏览器特效Rss订阅
特效代码搜索
浏览器特效推荐
无边的信息导航窗
标题栏上显示鼠标座标
频道方式打开窗口
showModalDialog Method
局部滚动
图片跟随鼠标移动的代码
Ajax风格的一款网页Loading
Window启动效果(Loading)
JS判断客户端使用的访问设备并加载对应CSS
JS+CSS 禁止复制网页指定区域的文字
猜你也喜欢看这些
看谁围的框子多
扫雷游戏脚本版
类似于乒乓球的网页游戏
打靶练习小游戏(可检测鼠标好坏)
推箱子
Js随机数--网页版的体育彩票选号器
速算训练 看看你的心算能力够不够好
滚动条控制的图片水平展示效果
JavaScript 根据随机数原因生成DNA字符序列
二元方程计算器
相关链接:
复制本页链接
|
搜索把搜索到的链接显示在Textarea框中
特效说明:
浏览器模板
-
把搜索到的链接显示在Textarea框中
。
收藏&分享
QQ空间
新浪微博
腾讯微博
人人网
开心网
百度搜藏
复制网址
更多...