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

📄 day4_6.html

📁 JSP快速教程
💻 HTML
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312-80"><style type="text/css"><!--a:link {  color: blue; text-decoration: none}a:visited {  color: purple; text-decoration: none}a:hover {  color: #CC0033; text-decoration: underline}--></style><title>JavaScript教程</title></head><body topmargin="1" leftmargin="2"><table border="0" width="591" cellspacing="0">  <tr>    <td bgcolor="#ffff99" width="451">JavaScript教程 - 第四课</td>  </tr>  <tr>    <td bgcolor="#FF6600" width="451"><a href="mailto:thau@wired.com">Thau</a></td>  </tr></table><div align="left"><table border="0" width="630" cellspacing="0">  <tr>    <td width="458" valign="top" align="left"><strong><small><small><br>    </small></small><font face="宋体" size="3">第六页:</font><font SIZE="3">嵌套循环</font></strong>     <p><font face="宋体" size="3">这是程序:</font></p>    <p><font face="宋体"><br>    var height = prompt(&quot;How high do you <br>    want the grid? (1-10 is good)&quot;,&quot;10&quot;);<br>    <br>    var width= prompt(&quot;How wide do you want <br>    the grid? (1-10 is good)&quot;,&quot;10&quot;);<br>    <br>    var a_line;<br>    <br>    var new_window = <br>    window.open(&quot;/webmonkey/98/04/files1a<br>    /grid.html&quot;,&quot;looper&quot;,&quot;width=400,height=400&quot;);<br>    <br>    new_window.document.writeln(&quot;&lt;h1&gt;A Grid&lt;/h1&gt;&quot;);<br>    <br>    for (height_loop = 0; height_loop <br>    &lt; height; height_loop++) <br>    <br>    { <br>    <br>    a_line = &quot;&quot;;<br>    <br>    for (width_loop = 0; <br>    width_loop &lt; width; width_loop++)<br>    <br>    {<br>    <br>    a_line+=&quot;x&quot;;<br>    <br>    }<br>    <br>    new_window.document.writeln<br>    (a_line + &quot;&lt;br&gt;&quot;);<br>    <br>    }<br>    </font></p>    <p ALIGN="JUSTIFY"><font face="宋体" size="3">在请求高及宽后,打开一新窗口,并为它写一个头,进入for<br>    循环。第一个for循环设a_line=“”。试一下不用该行做一下<br>    本例,看看会发生什么。在初始化a_line后,程序进入下一个<br>    for循环,当宽达到所需值后,建立X`S行并将它显现在新窗<br>    口中。这些将发生height次。</font></p>    <p ALIGN="JUSTIFY"><font face="宋体" size="3">好,现在你的任务:看一下这个<a    href="day4_7.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_7.html">循环练习</a>并亲自试着在看源码<br>    前写一个。</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_6.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_6.html"><font SIZE="3">第四课介绍</font></a><font size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第二页</font> <a href="day4_2.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_2.html">循环介绍</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第三页</font> <a href="day4_3.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_3.html">循环的密码</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第四页</font> <a href="day4_4.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/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" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_5.html">For循环</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_7.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_7.html">循环练习</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第八页</font> <a href="day4_8.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_8.html">数组</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第九页</font> <a href="day4_9.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_9.html">数组和循环</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第十页</font> <a href="day4_10.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_10.html">文件目标模块中的数组</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第十一页</font> <a href="day4_11.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_11.html">函数</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第十二页</font> <a href="day4_12.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_12.html">无参数函数</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第十三页</font> <a href="day4_13.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_13.html">参数及返回值</a></font><font    size="2"><br>    </font><font SIZE="3"><font color="#FF0000">第十四页</font> <a href="day4_14.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day4_14.html">多于一个参数的函数</a></font></p>    <p align="left"><font face="宋体" size="3">[<a href="index.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/index.html">第1课</a>][<a    href="day2_1.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day2_1.html">第2课</a>][<a href="day3_1.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day3_1.html">第3课</a>][第4课][<a    href="day5_1.html" tppabs="http://sun150-2.fimmu.edu.cn/doing/js1/day5_1.html">第5课</a>]</font></p>    <hr align="left">    <p><font size="2">本文由<a href="javascript:if(confirm('http://chd.126.com/  \n\n文件并未依 Teleport Pro 取回,因为 它的域或路径超过开始网址中设置的范围。  \n\n你要从服务器上打开它吗?'))window.location='http://chd.126.com/'" tppabs="http://chd.126.com/" target="_blank">《</font><font    face="verdana, arial, geneva, sans-serif" size="2">CHD</font><font size="2">的网络教室》</a>根据<a    href="javascript:if(confirm('http://www.webmonkey.com.cn/  \n\n文件并未依 Teleport Pro 取回,因为 它的域或路径超过开始网址中设置的范围。  \n\n你要从服务器上打开它吗?'))window.location='http://www.webmonkey.com.cn/'" tppabs="http://www.webmonkey.com.cn/" target="_blank">《网猴》</a>相关文章改编,版权归<a    href="javascript:if(confirm('http://www.webmonkey.com.cn/  \n\n文件并未依 Teleport Pro 取回,因为 它的域或路径超过开始网址中设置的范围。  \n\n你要从服务器上打开它吗?'))window.location='http://www.webmonkey.com.cn/'" tppabs="http://www.webmonkey.com.cn/" target="_blank">《网猴》</a>所有</font></td>  </tr></table></div></body></html>

⌨️ 快捷键说明

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