📄 ch03.asp
字号:
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./ch03.files/filelist.xml">
<link rel=Edit-Time-Data href="./ch03.files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>第 3 章 认识 VB Script 程式</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>zbg2000</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>zbg2000</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>5</o:TotalTime>
<o:Created>2000-04-13T10:14:00Z</o:Created>
<o:LastSaved>2000-04-13T10:19:00Z</o:LastSaved>
<o:Pages>2</o:Pages>
<o:Words>525</o:Words>
<o:Characters>2993</o:Characters>
<o:Company>betc</o:Company>
<o:Lines>24</o:Lines>
<o:Paragraphs>5</o:Paragraphs>
<o:CharactersWithSpaces>3675</o:CharactersWithSpaces>
<o:Version>9.2812</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>
<w:Compatibility>
<w:UseFELayout/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:1 135135232 16 0 262144 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";}
p
{font-size:12.0pt;
font-family:宋体;
mso-bidi-font-family:"Times New Roman";}
/* Page Definitions */
@page
{mso-page-border-surround-header:no;
mso-page-border-surround-footer:no;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:42.55pt;
mso-footer-margin:49.6pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white background=B01.jpg lang=ZH-CN link=blue vlink=blue
style='tab-interval:21.0pt'>
<!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white">
<v:fill src="B01.jpg" type="tile"/>
</v:background></xml><![endif]-->
<div class=Section1>
<p><b><span style='font-size:13.5pt;color:maroon'>第<span lang=EN-US> 3 章 认识 VB
Script 程序</span></span></b></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><b><span lang=EN-US
style='color:maroon'>ASP 的输入</span></b></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Echo.asp?Name=KJWang&Love=VB">Echo.asp?Name=KJWang&Love=VB</a>
-- 利用浏览器的网址来输入的数据 <a href="Viewasp.asp?FileName=ch03\echo.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Average.asp?Name=KJWang&BCC=98&VB=100&ASP=99">Average.asp?Name=KJWang&BCC=98&VB=100&ASP=99
</a>-- 读取来自浏览器所输入的数据 <a href="Viewasp.asp?FileName=ch03\Average.asp">(查看源代码)</a></span></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><strong><span
style='color:maroon'>让程序转向的语句</span></strong></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Ex02Ans.asp">Ex02Ans.asp</a> -- 判断系统时间 <a
href="Viewasp.asp?FileName=ch03\Ex02Ans.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Echo2.asp?Name=KJWang&Love=VB">Echo2.asp?Name=KJWang&Love=VB</a>
-- 判断 Empty 数据的实际应用 <a href="Viewasp.asp?FileName=ch03\echo2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\num.asp?N=100">Num.asp?N=100</a> -- 输入一整数N,并判断这个整数是负数、一位数、二位数、或是三位数以上
<a href="Viewasp.asp?FileName=ch03\Num.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\num2.asp?N=100">Num2.asp?N=100</a> -- 输入一整数N,并判断这个整数是负数、一位数、二位数、或是三位数以上
<a href="Viewasp.asp?FileName=ch03\Num2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\WeekBg.asp">WeekBg.asp</a> -- 根据星期几来显示不同的背景图片 <a
href="Viewasp.asp?FileName=ch03\WeekBg.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Movie.asp?age=20">Movie.asp?age=20</a> -- 用Case将条件值一一列出来 <a
href="Viewasp.asp?FileName=ch03\Movie.asp">(查看源代码)</a></span></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><strong><span
style='color:maroon'>让程序循环的语句</span></strong></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\For01.asp">For01.asp</a> -- For...Next 循环语句 <a
href="Viewasp.asp?FileName=ch03\For01.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\For02.asp">For02.asp</a> -- For...Next 循环语句 <a
href="Viewasp.asp?FileName=ch03\For02.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\GenSize.asp">GenSize.asp</a> -- 利用 For 循环产生字体变化 <a
href="Viewasp.asp?FileName=ch03\GenSize.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Moon.asp">Moon.asp</a> -- 利用 For 循环显示多个图形文档 <a
href="Viewasp.asp?FileName=ch03\Moon.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Sum01.asp">Sum01.asp</a> -- 利用 For 循环来计算累加运算式 <a
href="Viewasp.asp?FileName=ch03\Sum01.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Sum02.asp">Sum02.asp</a> -- 利用 For 循环来计算累加运算式,「步进值」等于 3 <a
href="Viewasp.asp?FileName=ch03\Sum02.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Love.asp?N=4&Love1=运动&Love2=音乐&Love3=电动&Love4=睡觉">Love.asp?N=4&Love1=运动&Love2=音乐&Love3=电动&Love4=睡觉</a>
-- 利用 For 循环读取输入数据 <a href="Viewasp.asp?FileName=ch03\Love.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\While01.asp">While01.asp</a> -- 使用 While-Wend 循环从 1 输出到 10 <a
href="Viewasp.asp?FileName=ch03\While01.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Love02.asp?Love1=运动&Love2=音乐&Love3=电动&Love4=睡觉">Love02.asp?Love1=运动&Love2=音乐&Love3=电动&Love4=睡觉</a>
-- 利用 While 循环读取输入数据 <a href="Viewasp.asp?FileName=ch03\Love02.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\NestLoop.asp">NestLoop.asp</a> -- 嵌套循环 <a
href="Viewasp.asp?FileName=ch03\NestLoop.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\GenTable.asp">GenTable.asp</a> -- 利用嵌套循环产生 5×4 的表格 <a
href="Viewasp.asp?FileName=ch03\GenTable.asp">(查看源代码)</a></span></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><strong><span
style='color:maroon'>本章练习参考解答</span></strong></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Average2.asp?Name=KJWang&S1=95&S2=99&S3=98">Average2.asp?Name=KJWang&S1=95&S2=99&S3=98
</a>-- 读取来自浏览器所输入数据 <a href="Viewasp.asp?FileName=ch03\Average2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="CH03\Average3.asp?Name=KJWang&S1=90&S2=80&S3=85">Average3.asp?Name=KJWang&S1=90&S2=80&S3=85</a>
-- 读取来自浏览器所输入数据 <a href="Viewasp.asp?FileName=ch03\Average3.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\For03.asp">For03.asp</a> -- 计算 4+9+13+18┅+94+99, 使用两个 For 循环 <a
href="Viewasp.asp?FileName=ch03\For03.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Moon2.asp">Moon2.asp</a> -- 利用 <TABLE>、<TR>、<TD> 标示及
For 循环将图形文档显示于网页 <a href="Viewasp.asp?FileName=ch03\Moon2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\Moon3.asp">Moon3.asp</a> -- 利用嵌套循环将图形文档显示于网页 <a
href="Viewasp.asp?FileName=ch03\Moon3.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch03\99.asp">99.asp</a> -- 利用嵌套循环产生九九乘法表 <a
href="Viewasp.asp?FileName=ch03\99.asp">(查看源代码)</a></span></p>
<div class=MsoNormal align=center style='text-align:center'><span lang=EN-US>
<hr size=2 width="100%" align=center>
</span></div>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -