⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d0002.htm

📁 JavaScript源代码全集
💻 HTM
字号:
<!--Saved  from《天索星网》http://www.tasoo.2000c.net,E-mail:tasoo_cn@yahoo.com.cn-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!-- A:link {text-decoration: none; color:#000000}
     A:visited {text-decoration: none; color: #000000}
     A:active {text-decoration: none; color: #FF0000}
     A:hover {text-decoration: underline; color: FF0000}
     body{font-size=9pt}
	    TH{FONT-SIZE: 9pt}
       TD{ FONT-SIZE: 9pt}-->
</style>
<title>《网络教程》之Javascript--站内导航——02</title>
</head>

<body topmargin="0" leftmargin="0">
<div align="center"><center>

<table border="0" width="90%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" colspan="3"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="250"><img src="../photo/jx.gif" border="0" WIDTH="200" HEIGHT="80"></td>
        <td width="468" height="60"></td>
      </tr>
    </table>
    </center></div></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#C8C882" valign="middle" align="center" height="22"></td>
    <td width="80%" bgcolor="#C8C882" valign="middle" align="center" colspan="2" height="22"><strong><span style="font-size: 10pt; font-family: Arial">javascript导航类</span></strong></td>
  </tr>
  <tr>
    <td width="20%" valign="top" align="left"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">时间类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">文字类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">导航类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">鼠标类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">按钮类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">跑马灯</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm"><strong><font face="Arial">COOKIE</font></strong>类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">其他类</a></span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="10" bgcolor="#505028"></td>
      </tr>
    </table>
    </center></div></td>
    <td width="80%" valign="top" align="left" colspan="2"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" bgcolor="#EBEBEB" valign="middle" align="center" height="18" colspan="3"><span style="font-size: 9pt">站内导航——02</span></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="2" colspan="3"></td>
      </tr>
      <tr>
        <td width="100%" valign="middle" align="center" height="1" colspan="3" bgcolor="#000080"></td>
      </tr>
      <tr>
        <td width="16%" valign="middle" align="center" height="22"></td>
        <td width="67%" valign="middle" align="center" height="22"><p align="center">测试:试一试查询英文字符“<strong><font face="Arial, Helvetica, sans-serif" color="#FF0000"><span style="font-size: 12pt">tasoo</span></font></strong>”或 
        中文字符“<font color="#FF0000"><strong><span style="font-size: 12pt">天索</span></strong></font>”,测试输出效果。</p>
        <form name="form1">
          <u><p>请输入查询关键词:</u><br>
          <input type="text" name="searchfor" value size="20"> <input type="button" value="查询" onClick="checkDatabase()" name="button"> </p>
        </form>
        <p><script LANGUAGE="JavaScript">
<!-- Hide Script from Old Browsers
Keyword = new Object();
Descrip = new Object();
Address = new Object();

// Keyword[0] = n (where n is the number of keywords which can be searched
Keyword[0] = 3 //对应查询组的数量;

Keyword[1] = "tasoo" //关键字
Descrip[1] = "tasoo starnet" //网站描述
Address[1] = "http://www.tasoo.2000c.net" //网站连接 

Keyword[2] = "天索"
Descrip[2] = "天索星网,tasoo starnet"
Address[2] = "http://tasoo.yeah.net/"

Keyword[3] = "tasoo"//关键字
Descrip[3] = "天索星网"
Address[3] = "http://tasoo.in-china.com"
function checkDatabase() {

var Found = false
var Item = document.forms[0].searchfor.value.toLowerCase();

stats='toolbar=no,location=no,directories=no,status=no,menubar=no,' 
stats += 'scrollbars=yes,resizable=yes' 
MsgBox = window.open ("","msgWindow",stats) 
MsgBox.document.write("<head><title>查询结果</title></head>");
MsgBox.document.write ("<BODY BGCOLOR=#ffffff TEXT=#000000 LINK=#000080 VLINK=#800040 ALINK=#FF0000><CENTER>查询结果</CENTER>") 
MsgBox.document.write ("找到关键字: "+Item+"<HR>");
for (var i=1; i <= Keyword[0]; i++) {
if(Item == Keyword[i]) {
Found = true;
MsgBox.document.write (Descrip[i]+"<BR><A HREF="+Address[i]+">点击这里访问</A><br>") 

}
}
if(!Found)
MsgBox.document.write ("没有发现与该关键词有关的条目。") 
MsgBox.document.write ("<H6>返回!<BR><A HREF=http://www.tasoo.2000c.net>http://www.tasoo.2000c.net</A></H6>")
MsgBox.document.write ("<FORM class='pt9'><CENTER>") 
MsgBox.document.write ("<INPUT type='button' value='关闭查询窗口' onClick = 'self.close()'>") 
MsgBox.document.write ("</CENTER></FORM>") }
// -->
</script> <br>
        </p>
        <p><p</td> </td>
        <td width="17%" valign="middle" align="center" height="22"></td>
      </tr>
      <tr>
        <td width="16%" valign="middle" align="center" height="20"></td>
        <td width="67%" valign="middle" align="left" height="20"><span style="font-size: 9pt; color: rgb(255,0,0)">拷贝以下源代码到你的html文件的&lt;body&gt;和&lt;/body&gt;之间</span><font color="#FF0000">;<br>
        除了数据库部分其余不要改变。</font><br>
        </td>
        <td width="17%" valign="middle" align="center" height="20"></td>
      </tr>
      <tr>
        <td width="16%" valign="middle" align="center" height="22" rowspan="2"></td>
        <td width="67%" valign="middle" align="center" height="11" bgcolor="#F0FAFF"><span style="font-size: 9pt"><form name="copy1">
          <p><textarea rows="10" name="S1" cols="40" onMouseOver="this.focus()" onFocus="this.select()">&lt;script LANGUAGE=&quot;JavaScript&quot;&gt;
<!-- Hide Script from Old BrowsersKeyword = new Object();Descrip = new Object();Address = new Object();// Keyword[0] = n (where n is the number of keywords which can be searchedKeyword[0] = 3 //对应查询组的数量;Keyword[1] = "tasoo" //关键字Descrip[1] = "tasoo starnet" //网站描述Address[1] = "http://www.tasoo.2000c.net" //网站连接 Keyword[2] = "天索"Descrip[2] = "天索星网,tasoo starnet"Address[2] = "http://tasoo.yeah.net/"Keyword[3] = "tasoo"//关键字Descrip[3] = "天索星网"Address[3] = "http://tasoo.in-china.com"function checkDatabase() {var Found = falsevar Item = document.forms[0].searchfor.value.toLowerCase();stats='toolbar=no,location=no,directories=no,status=no,menubar=no,' stats += 'scrollbars=yes,resizable=yes' MsgBox = window.open ("","msgWindow",stats) MsgBox.document.write("<head><title>查询结果</title></head>");MsgBox.document.write ("<BODY BGCOLOR=#ffffff TEXT=#000000 LINK=#000080 VLINK=#800040 ALINK=#FF0000><CENTER>查询结果</CENTER>") MsgBox.document.write ("找到关键字: "+Item+"<HR>");for (var i=1; i <= Keyword[0]; i++) {if(Item == Keyword[i]) {Found = true;MsgBox.document.write (Descrip[i]+"<BR><A HREF="+Address[i]+">点击这里访问</A><br>") }}if(!Found)MsgBox.document.write ("没有发现与该关键词有关的条目。") MsgBox.document.write ("<H6>返回!<BR><A HREF=http://www.tasoo.2000c.net>http://www.tasoo.2000c.net</A></H6>")MsgBox.document.write ("<FORM class='pt9'><CENTER>") MsgBox.document.write ("<INPUT type='button' value='关闭查询窗口' onClick = 'self.close()'>") MsgBox.document.write ("</CENTER></FORM>") }// -->
&lt;/script&gt;</textarea></p>
        </form>
        <p></span> </td>
        <td width="17%" valign="middle" align="center" height="22" rowspan="2"></td>
      </tr>
      <tr>
        <td width="67%" valign="middle" align="left" height="11" bgcolor="#F0FAFF"><font color="#FF0000">如下代码生成查询表单界面:</font><p><font color="#000000">&lt;form 
        name=&quot;form1&quot;&gt;<br>
        &lt;u&gt;请输入查询关键词:&lt;/u&gt;&lt;br&gt;<br>
        &lt;input type=&quot;text&quot; name=&quot;searchfor&quot; value=&quot;&quot; size=20&gt;<br>
        &lt;input type=&quot;button&quot; value=&quot;查询&quot; 
        onClick=&quot;checkDatabase()&quot; name=&quot;button&quot;&gt;<br>
        &lt;br&gt;<br>
        &lt;!-- End Of File --&gt; <br>
        &lt;font color=&quot;#FF0000&quot;&gt;输入小写字符&lt;/font&gt; <br>
        &lt;p&gt; <br>
        &lt;/form&gt;</font></p>
        <p><font color="#FF0080">说明:红色是数据库记录,你可以输入尽可能多的记录项,只要仿照格式些即可。本脚本可以查询中文。</font></td>
      </tr>
    </table>
    </center></div></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="20"></td>
    <td width="60%" height="20"></td>
    <td width="20%" height="20"></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#FFFFFF" valign="middle" align="center"></td>
    <td width="60%" height="10"><p align="center"><span style="font-size: 9pt"><a href="d0001.htm">上一页</a> &nbsp;&nbsp;&nbsp; <a href="d0003.htm">下一页</a></span></td>
    <td width="20%"></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#FFFFFF" valign="middle" align="center"></td>
    <td width="60%" height="10"></td>
    <td width="20%"></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#FFFFFF" valign="middle" align="center"></td>
    <td width="60%" height="10"></td>
    <td width="20%"></td>
  </tr>
  <tr>
    <td width="20%" bgcolor="#FFFFFF" valign="middle" align="center"></td>
    <td width="60%"><div align="center"><center><table cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%"><p align="center"><font color="#969696"><span style="font-size: 9pt">《天索星网》 
        星网制作 版权所有</span></font></td>
      </tr>
      <tr>
        <td width="100%"><p align="center"><font color="#969696"><span style="font-size: 9pt; font-family: Arial">&copy;2000-2001 All Rights Reserved</span></font></td>
      </tr>
      <tr>
        <td width="100%"></td>
      </tr>
    </table>
    </center></div></td>
    <td width="20%"></td>
  </tr>
</table>
</center></div>
</body>
</html>
<!--Saved  from天索星网  版权所有;http://www.tasoo.2000c.net,E-mail:tasoo_cn@yahoo.com.cn-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -