|
作者: q70213526 [q70213526] 版主 | 登录 |
<html> <head> <title>站内搜索</title> <style type="text/css"> <!-- p{font:9pt"宋体";text-decoration:none} td{font:9pt"宋体";text-decoration:none} a{font:9pt"宋体";text-decoration:none} body{font:9pt"宋体";text-decoration:none} .pt9{font:"宋体";text-decoration:none} --> </style> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <script language="javascript"> <!-- function doInstructions(){ instructions=window.open("","instructions","toolbar=no,location=0,directories=0,status=no,menubar=0,scrollbars=yes,resizable=0,copyhistory=0,width=300,height=360"); instructions.document.writeln('<center><font size=+2>检索秘决</font></center>'); instructions.document.writeln('<hr width=75%>'); instructions.document.writeln('<font size=-1><ul type="disc">'); instructions.document.writeln('<li>在检索框内输入关键字,请使用小写字符或中文。'); instructions.document.writeln('<li>单击查询按钮开始查询。'); instructions.document.writeln('<li>单击清除按钮可以清除输入的字符。'); instructions.document.writeln('<li>由于数据库随时更新,如果你以前来过这里,请记得'); instructions.document.writeln('<li>感谢光临,有问题来信询问 qiuqiongzhi@163.com'); instructions.document.writeln('<li>http://www.tourism.bak.cn'); instructions.document.writeln('</ul></font>'); } //--> </script> <!--检索秘决代码结束> </head><body bgcolor="#000000" link="#0000ff" vlink="#800080"> <center> <script language="javascript"> <!-- var key=""; function makeEntry() { this.Name=""; this.URL=""; this.Desc=""; this.Category=""; this.Target=""; return this; } function makeArray(n) { this.length=n; for (var k=1;k<=n;k++){ this[k]=""; } return this; } function makeLinks(size){ this.length=size; for(var r=1;r<size;r++){ this[r]=new makeEntry(); this[r].Name=namesArray[r]; this[r].URL=urlsArray[r]; this[r].Desc=descArray[r]; this[r].Category=categoryArray[r]; this[r].Target=targetArray[r]; } return this; } var linksize=0 datesArray=new makeArray(linksize); namesArray=new makeArray(linksize); urlsArray=new makeArray(linksize); descArray=new makeArray(linksize); categoryArray=new makeArray(linksize); targetArray=new makeArray(linksize); var arraycount=0 <!-- 以下是数据库部分,自己模仿格式随意添加。--> arraycount +=1 urlsArray[arraycount]="http://www.nicrosoft.com" namesArray[arraycount]="Microsoft Home Page" descArray[arraycount]="The Home of Bill Gages empire" targeArray[arraycount]="target=_blank" <!--------数据库结束-------------> <!--------以下是输出的结果--------> function searchLinks(links,keyword){ document.write("<body bgcolor='#ffffff' text='#000000' link='#0000ff' vlink='#80080'>"); document.write("搜索关键字结果:<strong>"+keyword+"</strong><br><br>"); for (var q=1;<=links.length;q++){ if(links[q].URL.toLowerCase().indexOf(keyword)!=-1){ document.write("<a href="+links[q].URL+""+links[q].Target+">"+links[q].Name+"</a>-"); document.write(links[q].Category+"<br><br>"); continue; } if(links[q].Desc.toLowerCase().indexOf(keyword)!=-1){ document.write("<a href="+links[q].URL+""+links[q].Target+">"+links[q].Name+"</a>-"); document.write(links[q].Category+"<br><br>"); continue; if(links[q].Name.toLowerCase().indexOf(keyword)!=-1){ document.write("<a href="+links[q].URL+""+links[q].Target+">"+links[q].Name+"</a>-"); document.write(links[q].Category+"<br><br>"); continue; } } } //--> </script> <noscript>Sorry.you must have ajavascript enabled brower.<br> <a href="http://www.netscapel.com/download/nav_download.html?">Netscape Navigator 4.04</a>is recommended.</noscript> <!--以下是查询表单的界面--> <form name="form"> <p><br> 关键字: <input type="text" size=25 name="search"> <input type="button" name="submit" value="开始查找" onClick="validate_form()" class="pt9"> <input type="reset" name="reset" value="清除" class="pt9"> <!--如果不需要检索秘决,请取消如下<scrip>和</script>之间的代码--> <!-- document.writeln('<font size=2><a href="javascript:doInstructions();" onMouseOver='window.status=\Click here for instructions\'; return ture"onMouseOut="window.status=\'\';return true">查询秘决</a></font>'); //--> </script> <br> </p> <p> <input type="button" name="view" value="看详细注释的源码" onClick="window.location="view-source:"+window.location.href" class="pt9"> <br> </p> </form> <!--以下是填入的关键字合法性检查,不要改变。--> <script> <!-- function validate_form(){ txt=document.form.search.value; if(txt.indexOf(",")!=-1){ alert("Search is invalid!Contains a ','");return;} if(txt.indexOf("@")!=-1){ alert("Search is invalid!Contains a '@'");return;} if(txt.indexOf("#")!=-1){ alert("Search is invalid!Contains a '#'");return;} if(txt.indexOf("$")!=-1){ alert("Search is invalid!Contains a '$'");return;} if(txt.indexOf("%")!=-1){ alert("Search is invalid!Contains a '%'");return;} if(txt.indexOf("*")!=-1){ alert("Search is invalid!Contains a '*'");return;} if(txt.indexOf("(")!=-1){ alert("Search is invalid!Contains a '('");return;} if(txt.indexOf(")")!=-1){ alert("Search is invalid!Contains a ')'");return;} if(txt.indexOf("[")!=-1){ alert("Search is invalid!Contains a ']'");return;} if(txt.indexOf("]")!=-1){ alert("Search is invalid!Contains a ']'");return;} if(txt.indexOf(";")!=-1){ alert("Search is invalid!Contains a ';'");return;} if(txt.indexOf("<")!=-1){ alert("Search is invalid!Contains a '<'");return;} if(txt.indexOf(">")!=-1){ alert("Search is invalid!Contains a '>'");return;} if(txt.indexOf("?")!=-1){ alert("Search is invalid!Contains a '?'");return;} if(txt.indexOf("=")!=-1){ alert("Search is invalid!Contains a '='");return;} else { jsi=new makeLinks(linksize); searchLinks(jsi,txt); document.write("<hr>"); document.write("a href='search.htm'返回检索页</a><br><br>"); //改变上述文件名,指向你的搜索页面,以便访问者返回。 } } //--》 </script> <center> </body> </html> |
地主 发表时间: 04-07-19 20:46 |
回复: q70213526 [q70213526] 版主 | 登录 |
呵呵 太长了吗?? 我可是找不到什么原因了。 |
B1层 发表时间: 04-07-20 22:08 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号