您好,欢迎来到模板无忧!
登录
注册
闂佽 鍋撻柟顖滃椤ワ拷
闂佺懓鍚嬬划搴ㄥ磼閿燂拷
闂侀潻闄勫妯好归敓锟�
闁汇埄鍨奸崰鏍ㄦ叏閿燂拷
模板无忧
网页特效
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI鐏忓繗浠� 閼宠棄鍟撴导姘辨暰
閸╃喎鎮�
閹恒劏宕�
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
综合其它特效代码
>
收藏
分享
查看评论
综合其它
演示
查找页面中的字符_综合其它特效
查看演示效果
特效Tag:
页面
字符
添加
缂佸洦鈪礑edeCMS鐟欏棝顣堕弫娆戔柤
娑旀壆鈹栭梻锟� 缁夌喐婀囬崝鈥虫珤 闁缍夌涵鏇氱鞍閼辨棑绱�
閺冪姴鍜栫粩娆撴毐瀹搞儱鍙�,閻ф儳瀹抽弶鍐櫢娑撯偓闁款喖鍙忛弻锟�!
查找页面中的字符,您可以先修改部分代码再运行.
<html> <head> <title>查找页面中的字符</title> <meta http-equiv="Content-Type" mrc="text/html; charset=gb2312"> </head> <body bgcolor="#FFFFFF"> <table bgcolor="#000000" cellspacing="1" width="500" align="center"> <tbody> <tr> <td bgcolor="#4775c3" align="center"><strong style="font-weight: 400"> <font color="#FFFFFF" face="宋体" style="font-size: 9pt">查找页面中的字符</font></strong></td> </tr> </tbody> </table> <table border="0" cellpadding="0" cellspacing="0" width="500" align="center"> <tr> <td align="left" valign="top" width="340"></td> <td align="left" valign="top" width="109"> <p align="center"></p> </td> <td align="left" valign="top" width="304"><font face="宋体" size="4" color="#FF0000"> </font></td> </tr> <tr> <td align="left" width="340" valign="top"><font face="宋体" color="#FF0000"> <span style="font-size: 9pt">在页面中实现搜索功能,类似Word等文本编辑软件里的搜索功能,只要是页面中的字符(别管是显在的还是隐蔽在文本框内部的),用这个都能找出来,从此,你的网页中又多了一个强大的不同寻常的工具。</span></font></td> <td align="left" width="109" valign="top"><font face="宋体" color="#FF0000"> </font></td> <td align="left" valign="top" width="304"> <span style="font-size: 9pt">你可以输入“脚本”一词查查看(共有三处)<br> <script language="JavaScript"> var NS4 = (document.layers); // Which browser? var IE4 = (document.all); var win = window; // window to search. var n = 0; function findInPage(str) { var txt, i, found; if (str == "") return false; // Find next occurance of the given string on the page, wrap around to the // start of the page if necessary. if (NS4) { // Look for match starting at the current point. If not found, rewind // back to the first match. if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; // If not found in either direction, give message. if (n == 0) alert("Not found."); } if (IE4) { txt = win.document.body.createTextRange(); // Find the nth match from the top of the page. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } // If found, mark it and scroll it into view. if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } // Otherwise, start over at the top of the page and find first match. else { if (n > 0) { n = 0; findInPage(str); } // Not found anywhere, give message. else alert("Not found."); } } return false; } </script> </span> <form name="search" onSubmit="return findInPage(this.string.value);"> <p align="center"> <font size="3"><input name="string" type="text" size="15" onChange="n = 0;"></font> <input type="submit" value="Find"> </p> </form> </td> </tr> </table> <div align="center"> <table width="500"> <tbody> <td width="492"> <div align="center"> <center> <table width="100%"> <tr> <td bgcolor="#3366CC" style="BORDER-BOTTOM: #817af3 1px solid; BORDER-LEFT-COLOR: #817af3; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-COLOR: #817af3; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-COLOR: #817af3; BORDER-TOP-WIDTH: 1px" align="center"><font color="#FFFFFF" style="font-size: 9pt">使用说明</font></td> </tr> <tr bgcolor="#ffffff"> <td bgcolor="#FFFFFF" style="BORDER-BOTTOM: #817af3 1px solid; BORDER-LEFT-COLOR: #817af3; BORDER-LEFT-WIDTH: 1px; BORDER-RIGHT-COLOR: #817af3; BORDER-RIGHT-WIDTH: 1px; BORDER-TOP-COLOR: #817af3; BORDER-TOP-WIDTH: 1px" align="center"><br> <span style="font-size: 9pt">制作步骤:请将下面的代码插入到<body>部分: <br> </span> <form name="step"> <a href="javascript:selectAll('step.stepone')"><p></a><br> name="stepone" rows="12" cols="60">你可以输入“脚本”一词查查看 <script language="JavaScript"> var NS4 = (document.layers); // Which browser? var IE4 = (document.all); var win = window; // window to search. var n = 0; function findInPage(str) { var txt, i, found; if (str == "") return false; // Find next occurance of the given string on the page, wrap around to the // start of the page if necessary. if (NS4) { // Look for match starting at the current point. If not found, rewind // back to the first match. if (!win.find(str)) while(win.find(str, false, true)) n++; else n++; // If not found in either direction, give message. if (n == 0) alert("Not found."); } if (IE4) { txt = win.document.body.createTextRange(); // Find the nth match from the top of the page. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) { txt.moveStart("character", 1); txt.moveEnd("textedit"); } // If found, mark it and scroll it into view. if (found) { txt.moveStart("character", -1); txt.findText(str); txt.select(); txt.scrollIntoView(); n++; } // Otherwise, start over at the top of the page and find first match. else { if (n > 0) { n = 0; findInPage(str); } // Not found anywhere, give message. else alert("Not found."); } } return false; } </script> <form name="search" onSubmit="return findInPage(this.string.value);"> <font size=3><input name="string" type="text" size=15 onChange="n = 0;"></font> <input type="submit" value="Find"> </form> 哈哈,这里还有一个“脚本”
所属频道:
综合其它特效
/
更新时间:2013-01-08
[收藏]
[报错]
[返回列表]
评论加载中....
相关
综合其它特效
:
MD5加密
页面保护 可以禁止某些IP的访问
冻结你的窗口,使窗口无法再响应
鼠标放上就激活链接
密码强弱度检测万能插件
叫你计算机"爬"着工作
仿VB密码
打开网页后即在后台打开无数记事本
输入正确进入密码保护页
一点按钮就会跳出无限窗口,直到耗尽您的资源
输入密码后才能进入页面
弹出无限IE
综合其它特效Rss订阅
特效代码搜索
综合其它特效推荐
JavaScript获取X、Y坐标及事件位置实例代码
测试你的镜像站的速度
下落的窗口
MD5加密
复制本页页面地址
JavaScript绘制曲线、圆形饼图实例
最全的网摘收藏和SNS分享代码,复制即可使用
Div+CSS简单的例子
JavaScript生成随机数并自动排序
特殊字符、常规符号及其代码对照表
猜你也喜欢看这些
jQuery 超酷的立体渐变文字效果
jQuery Resizable 拖动右下角改变层大小的插件
jQuery常用的图片文字提示效果
104-新浪女性频道的Flash图片轮显效果
兼容火狐的日期选择插件webCalendar
236-走秀网JS四屏焦点图代码
Farbtastic jQuery圆形网页取色插件
jQuery 带小图预览切换的动感图片相册
几个使用jQuery做的简单动画菜单
法宝网首页大焦点图代码
相关链接:
复制本页链接
|
搜索查找页面中的字符
特效说明:
综合其它模板
-
查找页面中的字符
。
閺€鎯版&閸掑棔闊�
QQ缁屾椽妫�
閺傜増姘顔煎触
閼垫崘顔嗗顔煎触
娴滆桨姹夌純锟�
瀵偓韫囧啰缍�
閻ф儳瀹抽幖婊嗘
婢跺秴鍩楃純鎴濇絻
閺囨潙顦�...