实现WEB页内容查找和替换操作
来源:互联网 发布:wow60年代任务数据库 编辑:程序博客网 时间:2024/06/01 09:02
<html>
<head>
<title>Find and Replace Demo-www.51windows.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<script>
<!--
var iFlag;
function search() {
var wPopupElements=wPopup.document.all;
if (wPopupElements.textcase.checked)
{iFlag=4;}
else
{iFlag=0;}
if (wPopupElements.searchtext.value==null || wPopupElements.searchtext.value=='')
{
wPopup.alert("Specify a value to search for");
return;
}
if (rng.findText(wPopupElements.searchtext.value,10000,iFlag)==true)
{
rng.select();
// rng.style.textDecoration = "underline";
rng.scrollIntoView(true);
rng.moveStart("character");
}
else
{wPopup.alert("End of document");}
}
function replace() {
var wPopupElements=wPopup.document.all;
if (wPopupElements.textcase.checked)
{iFlag=4;}
else
{iFlag=0;}
if (wPopupElements.searchtext.value==null || wPopupElements.searchtext.value=='')
{
wPopup.alert("Specify a value to replace for");
return;
}
if (rng.findText(wPopupElements.searchtext.value,-10000,iFlag)==true)
{
rng.text = wPopupElements.replacetext.value;
}
else
{wPopup.alert("End of document");}
}
function replaceall() {
var rng = document.body.createTextRange();
var wPopupElements=wPopup.document.all;
if (wPopupElements.textcase.checked)
{iFlag=4;}
else
{iFlag=0;}
if (wPopupElements.searchtext.value==null || wPopupElements.searchtext.value=='')
{
wPopup.alert("Specify a value to replace for");
return;
}
for (i=0; rng.findText(wPopupElements.searchtext.value,10000,iFlag)!=false; i++)
{
rng.scrollIntoView();
rng.text = wPopupElements.replacetext.value;
}
setTimeout('wPopup.alert(i + " item(s) replaced!")',200);
}
//-->
</script>
<script>
<!--
function gofind() {
wPopup=window.open('about:blank','','width=350 height=110 left=200 top=200 menubar=no resizeable=no scrollbars=no toolbar=no');
var wPopupDoc=wPopup.document;
wPopupDoc.open();
wPopupDoc.write('<html>/n');
wPopupDoc.write('<head>/n');
wPopupDoc.write('<title>Find and Replace-www.51windows.Net</title>/n');
wPopupDoc.write('<style>/n');
wPopupDoc.write('body,td,div,{font:menu}/n');
wPopupDoc.write('button {width:80}/n');
wPopupDoc.write('</style>/n');
wPopupDoc.write('</head>/n');
wPopupDoc.write('<body bgcolor="buttonface" leftmargin="0" topmargin="0">/n');
wPopupDoc.write('<table width="350" border="0" cellspacing="0" cellpadding="3" bgcolor="buttonface">/n');
wPopupDoc.write('<tr>/n');
wPopupDoc.write('<td>Find what:</td>/n');
wPopupDoc.write('<td><input type="text" name="searchtext" onchange="window.opener.rng=window.opener.document.body.createTextRange()"></td>/n');
wPopupDoc.write('<td><button accesskey="S" name="searchbutton" onclick="window.opener.search()"><u>S</u>earch</button></td>/n');
wPopupDoc.write('</tr>/n');
wPopupDoc.write('<tr>/n');
wPopupDoc.write('<td>Replace with:</td>/n');
wPopupDoc.write('<td><input type="text" name="replacetext"></td>/n');
wPopupDoc.write('<td><button accesskey="R" name="replacebutton" onclick="window.opener.replace()"><u>R</u>eplace</button></td>/n');
wPopupDoc.write('</tr>/n');
wPopupDoc.write('<tr>/n');
wPopupDoc.write('<td colspan="2"><input type="checkbox" name="textcase" value="textcase">Match Case</td>/n');
wPopupDoc.write('<td><button accesskey="A" name="replaceallbutton" onclick="window.opener.replaceall()">Replace<u>A</u>ll</button></td>/n');
wPopupDoc.write('</tr>/n');
wPopupDoc.write('<tr>/n');
wPopupDoc.write('<td colspan="2"> </td>/n');
wPopupDoc.write('<td><button accesskey="C" name="cancelbutton" onclick="window.close()"><u>C</u>ancel</button></td>/n');
wPopupDoc.write('</tr>/n');
wPopupDoc.write('</table>/n');
wPopupDoc.write('</body>/n');
wPopupDoc.write('</html>/n');
wPopupDoc.close();
}
//-->
</script>
<button onclick="gofind()">Find and Replace</button>
What is FlashGet?
--------------------------------------------------------------------------------
FlashGet is specifically designed to address two of the biggest problems when downloading files: Speed and management of downloaded files.
If you've ever waited forever for your files to download from a slow connection, or been cut off midway through a download - or just can't keep track of your ever-growing downloads - FlashGet is for you. FlashGet can split downloaded files into sections, downloading each section simultaneously, for an increase in downloading speed from 100% to 500%. This, coupled with FlashGet's powerful and easy-to-use management features, helps you take control of your downloads like never before.
--------------------------------------------------------------------------------
Speed
FlashGet can automatically split files into sections or splits, and download each split simultaneously. Multiple connections are opened to each file, and the result is the the most efficient exploitation of the bandwidth available. Whatever your connection, FlashGet makes sure all of the bandwidth is utilized. Difficult, slow downloads that normally take ages are handled with ease. Download times are drastically reduced.
Management
FlashGet is capable of creating unlimited numbers of categories for your files. Download jobs can be placed in specifically-named categories for quick and easy access. The powerful and easy-to-use management features in FlashGet help you take control of your downloads easily.
+ much, much more!
</body>
</html>
- 实现WEB页内容查找和替换操作
- js实现内容查找和替换
- 查找替换文本内容
- 文件内容查找替换
- vi基本操作(2) -- 查找和替换
- Vim的查找和替换修改操作
- java实现查找文本内容替换功能示例
- 文本文件中实现查找和替换
- 实现字符串的查找和替换
- js实现字符串的查找和替换
- 字符串查找替换操作
- 查找替换操作
- 查找替换文件内容脚本
- c++ STL string类的查找、替换和删除操作
- 使用Nginx反向代理和内容替换模块实现网页内容动态替换功能
- linux查找和替换
- 查找和替换字符串
- emacs查找和替换
- 忘记你我做不到
- FAQ:控制IE的搜索栏
- 如何在网页中播放RM格式
- js模仿人走路移动效果(51js)
- 一个很COOL的层窗体
- 实现WEB页内容查找和替换操作
- Java缩略语
- IE功能汇总
- sk_buff祥解
- 构建安全 ASP.NET 应用程序的简介
- ASP.NET应用程序的安全模型
- 常用的分页函数
- 软件测试及管理工具
- VB中创建可以输出函数的DLL