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

📄 js7.htm

📁 搜集的很多javascript实例及教程
💻 HTM
字号:
<!--Saved  from《网页设计师》pageone.yeah.net,作者:阿捷ajie@nease.net-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="Javascript,Javascript,Javascript,Javascript,Javascript">
<!--  以下代码是设定此页的超链接样式    -->
<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>
<script language="JavaScript">
<!--
function validate_form() {
validity = true;
if (!check_empty(document.form.NAME.value))
{ validity = false; alert('没有填写姓名!'); }
if (!check_email(document.form.EMAIL.value))
{ validity = false; alert('Email地址错误!'); }
if (!check_url(document.form.URL.value))
{ validity = false; alert('主页网址错误!'); }
if (!check_empty(document.form.DESCRIPTION.value))
{ validity = false; alert('缺少内容简介!'); }
if (validity)
alert ("Needed entries have been verified. "
+ "Your form is now being passed to your browser's "
+ "Mail Delivery Sub-System.");
return validity;
}

function check_empty(text) {
return (text.length > 0); 
}

function check_email(address) {
if ((address == "")
|| (address.indexOf ('@') == -1)
|| (address.indexOf ('.') == -1))
return false;
return true;
}

function check_url(address) {
if ((address == "")
|| (address.indexOf ('http://') == -1)
|| (address.indexOf ('.') == -1))
return false;
return true;
}
// -->
</script>

<title>检测正确性的友情链接发送表单</title>
</head>

<body bgcolor="#FFFFFF">

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="50%" bgcolor="#006DA2"><!--webbot bot="ImageMap" rectangle="(8,2) (105,34) http://www.pageone.yeah.net" src="../images/jlogo3.GIF" alt="网页设计师" border="0" width="111" height="36" startspan --><MAP NAME="FrontPageMap"><AREA SHAPE="RECT" COORDS="8, 2, 105, 34" HREF="http://www.pageone.yeah.net"></MAP><a href="../_vti_bin/shtml.exe/js/js7.htm/map"><img ismap usemap="#FrontPageMap" border="0" height="36" alt="网页设计师" src="../images/jlogo3.GIF" width="111"></a><!--webbot bot="ImageMap" endspan i-checksum="58478" --></td>
    <td width="50%" bgcolor="#006DA2"><p align="right"><br>
    <a href="js6.htm">上一页</a> <a href="js8.htm">下一页</a> <a href="../index.html">返回首页</a></td>
  </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5%" bgcolor="#B7D1F4" valign="top"></td>
    <td width="16%" bgcolor="#006DA2" valign="top"><table border="0" width="100%" cellspacing="4" cellpadding="0">
      <tr>
        <td width="16%"></td>
        <td width="84%"></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="index.htm">JAVASCRIPT</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../frontpage/index.htm">FRONTPAGE</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../dhtml/index.htm">DHTML</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../photoshop/index.htm">PHOTOSHOP</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../fireworks/index.htm">FIREWORKS</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../flash/index.htm">FLASH</a></font></td>
      </tr>
      <tr>
        <td width="16%"><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../cgi/index.htm">CGI</a></font></td>
      </tr>
      <tr>
        <td width="16%" a><font color="#ffff80">★</font></td>
        <td width="84%"><font face="Arial"><a href="../download/index.htm">DOWNLOAD</a></font></td>
      </tr>
      <tr>
        <td width="16%"></td>
        <td width="84%"></td>
      </tr>
    </table>
    </td>
    <td width="79%" valign="top"><table border="0" width="100%" cellspacing="1" cellpadding="0">
      <tr>
        <td width="12%" bgcolor="#B7D1F4"><p align="center"><font color="#FF8000">名称</font></td>
        <td width="88%" bgcolor="#FFFFFF"><p align="center">检测正确性的友情链接发送表单</td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#B7D1F4" valign="top"><p align="center"><font color="#FF8000">实例</font></td>
        <td width="88%"><table border="1" width="100%" bordercolor="#B7D1F4" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%"><form name="form" method="post" action="mailto:alone@188.net?SUBJECT=友情连接" enctype="text/plain" onSubmit="return validate_form()">
              <p>姓名:<br>
              <input type="text" size="40" name="NAME"><br>
              Email地址:<br>
              <input type="text" size="40" name="EMAIL"><br>
              主页网址:<br>
              <input type="text" size="40" name="URL" value="http://"><br>
              内容简介:<br>
              <textarea NAME="DESCRIPTION" ROWS="5" COLS="40" wrap="virtual"></textarea><br>
              <input type="submit" name="submit" value="立刻发送"> <input type="reset" value="重新填写"> </p>
            </form>
            <p align="center"> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#B7D1F4" valign="top"><p align="center"><font color="#FF8000">教程</font></td>
        <td width="88%"><table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#B7D1F4">
          <tr>
            <td width="100%" bgcolor="#FFFFFF"><br>
            第一步:拷贝下面的代码到你的html文件的&lt;head&gt;和&lt;/head&gt;之间;<blockquote>
              <form name="copy1">
                <p><textarea rows="4" name="S1" cols="39" onMouseOver="this.focus()" onFocus="this.select()">&lt;script language=&quot;JavaScript&quot;&gt;
<!--function validate_form() {validity = true;if (!check_empty(document.form.NAME.value)){ validity = false; alert('没有填写姓名!'); }if (!check_email(document.form.EMAIL.value)){ validity = false; alert('Email地址错误!'); }if (!check_url(document.form.URL.value)){ validity = false; alert('主页网址错误!'); }if (!check_empty(document.form.DESCRIPTION.value)){ validity = false; alert('缺少内容简介!'); }if (validity)alert ("Needed entries have been verified. "+ "Your form is now being passed to your browser's "+ "Mail Delivery Sub-System.");return validity;}function check_empty(text) {return (text.length > 0); }function check_email(address) {if ((address == "")|| (address.indexOf ('@') == -1)|| (address.indexOf ('.') == -1))return false;return true;}function check_url(address) {if ((address == "")|| (address.indexOf ('http://') == -1)|| (address.indexOf ('.') == -1))return false;return true;}// -->
&lt;/script&gt;
</textarea></p>
              </form>
            </blockquote>
            <p>第二步:拷贝下面的代码到你的html文件的&lt;body&gt;和&lt;/body&gt;之间;</p>
            <blockquote>
              <form name="copy2">
                <p><textarea rows="4" name="S1" cols="39" onMouseOver="this.focus()" onFocus="this.select()">&lt;form name=&quot;form&quot; method=&quot;post&quot;
            action=&quot;mailto:alone@188.net?SUBJECT=友情连接&quot; enctype=&quot;text/plain&quot;
            onSubmit=&quot;return validate_form()&quot;&gt;
              &lt;p&gt;姓名:&lt;br&gt;
              &lt;input type=&quot;text&quot; size=&quot;40&quot; name=&quot;NAME&quot;&gt;&lt;br&gt;
              Email地址:&lt;br&gt;
              &lt;input type=&quot;text&quot; size=&quot;40&quot; name=&quot;EMAIL&quot;&gt;&lt;br&gt;
              主页网址:&lt;br&gt;
              &lt;input type=&quot;text&quot; size=&quot;40&quot; name=&quot;URL&quot; value=&quot;http://&quot;&gt;&lt;br&gt;
              内容简介:&lt;br&gt;
              &lt;textarea NAME=&quot;DESCRIPTION&quot; ROWS=&quot;5&quot; COLS=&quot;40&quot; wrap=&quot;virtual&quot;&gt;&lt;/textarea&gt;&lt;br&gt;
              &lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;立刻发送&quot;&gt; &lt;input type=&quot;reset&quot;
              value=&quot;重新填写&quot;&gt; &lt;/p&gt;
            &lt;/form&gt;
</textarea></p>
              </form>
            </blockquote>
            <p>说明:这个表单会检测姓名是否为空,email是否含&quot;@&quot;&quot;.&quot;,网址是否含&quot;http&quot;&quot;.&quot;,内容是否为空。是很有实用性的表单程序。将其中的mailto:的email地址修改成你自己的就可以用了。</p>
            <p> </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#B7D1F4" valign="top"><p align="center"><font color="#FF8000">下载</font></td>
        <td width="88%" bgcolor="#FFFFFF"> 请到本站<a href="../download/index.htm">下载中心</a>下载</td>
      </tr>
      <tr>
        <td width="12%" bgcolor="#B7D1F4" valign="top"><p align="center"><font color="#FF8000">版权</font></td>
        <td width="88%" bgcolor="#FFFFFF"> 阿捷编辑整理</td>
      </tr>
    </table>
    </td>
  </tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" height="39">
  <tr>
    <td width="21%" bgcolor="#006DA2" height="25"><font color="#0072A8">.</font></td>
    <td width="79%" bgcolor="#E6F2FF" height="25" colspan="2"><p align="right"><br>
    <a href="js6.htm">上一页</a> <a href="js8.htm">下一页</a> <a href="js7.htm#top">回到页首</a></td>
  </tr>
  <tr>
    <td width="21%" height="3"></td>
    <td width="79%" height="3" align="center" colspan="2"><font color="#FFFFFF">.</font></td>
  </tr>
  <tr>
    <td width="21%" height="2"></td>
    <td width="27%" height="7" align="center" rowspan="2"><p align="right"><img src="../images/jlogo4.GIF" alt="jlogo4.GIF (1066 bytes)" WIDTH="26" HEIGHT="26"></td>
    <td width="52%" height="2">《<a href="http://pageone.yeah.net">网页设计师</a>》 
    阿捷制作 版权所有</td>
  </tr>
  <tr>
    <td width="21%" height="5"></td>
    <td width="52%" height="5"><font face="Arial">&copy;1999-2000</font> <font face="Arial">All 
    Rights Reserved</font></td>
  </tr>
  <tr>
    <td width="21%" height="4"></td>
    <td width="79%" height="4" align="center" colspan="2">本站教程免费学习,引用请注明出处,禁止抄袭。</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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