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

📄 day4_3.html

📁 不错的javascript学习资料适合于刚刚学习javascirpt的出学者
💻 HTML
📖 第 1 页 / 共 2 页
字号:
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page2.htm">程序设计</a></font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page3.htm">网站设计</a></font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<font color="#000000"><a href="../../1-download/page4.htm">电子商务</a></font> 
    </td>
  </tr>
  <tr> 
    <td colspan="2" align="center" bgcolor="#666699"><a href="../../1-teach/index.htm"><font color="#FFFFFF">实用技巧</font></a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/internet/index.htm">Internet应用</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/photoshop/index.html">Photoshop</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/flash/page1.html">Flash</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/asp/index.html">ASP</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/php/index.html">PHP</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/java/index.htm">Java</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/vb/index.htm">VB</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/c/index.htm">C、C++</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-backend/database/php_mysql/index.html">PHP/MySQL</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/perl_beginner/index.html">-Perl</a> 
    </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2">-<a href="../../1-teach/other/index.htm">其它</a> </td>
  </tr>
  <tr> 
    <td colspan="2" bgcolor="#666699"> 
      <div align="center"><font color="#FFFFFF">更多教程</font></div>
    </td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" height="17"><a href="../../1hdml/index.html">-HDML</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" height="23"><font face="宋体"><a href="../../1-backend/database/course/day1_1.html">-网络数据库</a></font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" height="14"><a href="../../1-backend/protocols/ping/index.html"><font face="arial, helvetica, sans-serif">-ping</font></a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" height="20"><a href="../../1-backend/cgi_perl/search_engine/index.html">-创建搜索引擎</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" height="16">-<a href="../../1adobe/GoLive/index.html">Adobe GoLive</a></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2"><a href="../../1-backend/cgi_perl/templates/index.html">-模板</a></td>
  </tr>
  <tr bgcolor="#666699"> 
    <td colspan="2" align="center"><font color="#FFFFFF">合作伙伴</font></td>
  </tr>
  <tr bgcolor="#FFFFFF"> 
    <td colspan="2" align="left">-<a href="http://www.5dmedia.com/" target="_blank">5D精英网</a></td>
  </tr>
  <tr align="center" bgcolor="#FFFFFF"> 
    <td colspan="2"> <img src="../../Library/front_monkey.gif" width="59" height="68"></td>
  </tr>
  </tbody> 
</table>
<!-- #EndLibraryItem --> </td>
 <!-- End of headlines (column 1: left column) --> <!-- Gutter between columns 1 and 2 --> 
 <td width="10" height="794"><img src="http://www.sohu.com/images/pixel.gif" width=10></td>
 <!-- Search box and directories (columns 2 and 3: middle columns, combined into one) --> 
 <td align=center valign=top width="558"> 
 <div align="left"><!-- #BeginEditable "1" --> 
<title>JavaScrip教程</title>
 <strong><font face="宋体" size="3">第三页:</font><font size="3">循环的密码</font></strong> 
      <p><font size="2" face="verdana, arial, geneva, sans-serif"></font>那就是密码!</p>
      <p> <font size="2" face="verdana, arial, geneva, sans-serif"></font>让我们逐行地来研究这个例子,如果你想看整个答案,可以查看源码。</p>
      <p> <font face="verdana, arial, geneva, sans-serif"></font>在这个典型的<font face="宋体" size="3">Java 
        script</font><font size="3"><font size="2">序言之后,我们从双变量申报开始:</font></font></p>
      <font size="3"> 
      <blockquote> 
        <p> <font size="2" face="verdana, arial, geneva, sans-serif"></font><font size="2"><br>
          </font><font size="2" face="verdana, arial, geneva, sans-serif">var 
          password=&quot;pass the wrench&quot;;<br>
          <br>
          var answer;<br>
          <br>
          </font></p>
      </blockquote>
      </font> 
      <p><font size="3"> <font size="2" face="verdana, arial, geneva, sans-serif"></font>这里我们定义该密码作为一个字符串,我们申报一个称为</font><br>
        answer<font size="3">的变量。你将理解为什么我们不得不立即申报一<br>
        个</font>answer。下面几行是非常重要的:</p>
      <blockquote> 
        <p><font size="2"><br>
          </font><font size="2" face="verdana, arial, geneva, sans-serif">while 
          (answer != password) <br>
          <br>
          {<br>
          <br>
          answer = prompt(&quot;What's the woyd?&quot;,&quot;&quot;);<br>
          <br>
          }<br>
          <br>
          </font></p>
      </blockquote>
      <p> <font size="2" face="verdana, arial, geneva, sans-serif"></font>这是一个<font size="3" face="宋体">while</font><font size="3">循环。</font><font size="3" face="宋体">while 
        </font><font size="3"><font size="2">循环的一般格式为:</font></font></p>
      <font size="3"> 
      <blockquote> 
        <p> <font size="2" face="verdana, arial, geneva, sans-serif"></font><font size="2"><br>
          </font><font size="2" face="verdana, arial, geneva, sans-serif">while 
          (some test is true)<br>
          <br>
          {<br>
          <br>
          do the stuff inside the curly braces<br>
          <br>
          }<br>
          <br>
          </font></p>
      </blockquote>
      </font> 
      <p><font size="3"> <font size="2" face="verdana, arial, geneva, sans-serif"></font>上述几行表明:“当</font><font size="3" face="宋体">answer</font><font size="3">不等价于</font><font size="3" face="宋体">Password</font><font size="3">时,执行提示<br>
        命令。”这一循环将持续地执行波形括号内的语句直至测试<br>
        失败。在使用者输入的单词与密码一致</font><font size="3" face="宋体">(</font><font size="3">即</font><font size="3" face="宋体">Pass 
        the wrench)</font><font size="3"><font size="2">的<br>
        情况下,测试必将失败。</font></font></p>
      <p><font size="3"> <font size="2" face="verdana, arial, geneva, sans-serif"></font>由于在对一个未申报的变量执行一个如</font><font size="3" face="宋体">(answer!=password)</font><font size="3">的<br>
        测试时,在某些浏览器上会产生错误,所以我们必须申<br>
        报</font><font size="3" face="宋体">answer</font><font size="3">。由于在</font><font size="3" face="宋体">while</font><font size="3">循环中将通过提示方案对</font><font size="3" face="宋体">answer</font><font size="3">赋值,<br>
        在我们第一次进行循环中,</font><font size="3" face="宋体">answer</font><font size="3"><font size="2">将没有数值。提前定义它并<br>
        设定其处始值为“”。</font></font></p>
      <p><font size="3"> <font size="2" face="verdana, arial, geneva, sans-serif"></font>由于不定义循环经常地使用,循环经常用来执行一组语句某一<br>
        特定的次数。这里用<a href="day4_4.html">另一个循环</a>来演示如何作这项工作。</font></p>
      <p align="left"><font face="宋体" size="3" color="#000000"><strong>JavaScript教程</strong></font><font color="#FF0000" face="宋体" size="3"><br>
        </font><font size="3" color="#FF0000">第一页</font><font size="2" face="宋体"> 
        </font><a href="day4_3.html"><font size="3">第四课介绍</font></a><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第二页</font> <a href="day4_2.html">循环介绍</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第三页</font> 循环的密码</font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第四页</font> <a href="day4_4.html">再谈<font face="宋体">WHILE</font>循环</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第五页</font> <a href="day4_5.html">For循环</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第六页</font> <a href="day4_6.html">嵌套循环</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第七页</font> <a href="day4_7.html">循环练习</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第八页</font> <a href="day4_8.html">数组</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第九页</font> <a href="day4_9.html">数组和循环</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第十页</font> <a href="day4_10.html">文件目标模块中的数组</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第十一页</font> <a href="day4_11.html">函数</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第十二页</font> <a href="day4_12.html">无参数函数</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第十三页</font> <a href="day4_13.html">参数及返回值</a></font><font size="2"><br>
        </font><font size="3"><font color="#FF0000">第十四页</font> <a href="day4_14.html">多于一个参数的函数</a></font></p>
      <p align="left"><font face="宋体" size="3">[<a href="index.html">第1课</a>][<a href="day2_1.html">第2课</a>][<a href="day3_1.html">第3课</a>][第4课][<a href="day5_1.html">第5课</a>]</font></p>
      <!-- #EndEditable --></div>
 </td>
 <!-- End of search box and directories (columns 2 and 3: middle columns, combined into one) --> 
 <!-- Gutter between columns 3 and 4 --> <!-- Other stuff (column 4: right column) --> 
 <!-- End of other stuff (column 4: right column) --> </tr>
 </table>
<!-- End of table surrounding page contents -->

 <hr noshade size=1 width=700>
 <span class=eng><br>
 Copyright (C) 1998-2000 Internet Technologies China.&nbsp; All rights reserved. 
 </span> 
</center>
</body>
<!-- #EndTemplate --></html>

⌨️ 快捷键说明

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