📄 ch04.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="./ch04.files/filelist.xml">
<link rel=Edit-Time-Data href="./ch04.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>第 4 章 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>7</o:TotalTime>
<o:Created>2000-04-13T10:21:00Z</o:Created>
<o:LastSaved>2000-04-13T10:28:00Z</o:LastSaved>
<o:Pages>2</o:Pages>
<o:Words>718</o:Words>
<o:Characters>4097</o:Characters>
<o:Company>betc</o:Company>
<o:Lines>34</o:Lines>
<o:Paragraphs>8</o:Paragraphs>
<o:CharactersWithSpaces>5031</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> 4 章 VB
Script 程序与网页制作的应用</span></span></b></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><strong><span
style='color:maroon'>数组<span lang=EN-US>(Array)</span></span></strong></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\NameExp.asp?Name=ASP">NameExp.asp?Name=ASP</a>-- 让上网者输入名词,然后查询该名词的解释
<a href="Viewasp.asp?FileName=ch04\NameExp.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\2D1.asp">2D1.asp</a> -- 使用For-Next嵌套循环,以「列」为外循环,输出二维数组数据<a
href="Viewasp.asp?FileName=ch04\2D1.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\2D2.asp">2D2.asp</a> -- 使用For-Next嵌套循环,以「行」为外循环, 输出二维数组数据<a
href="Viewasp.asp?FileName=ch04\2D2.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="ch04\SubStep0.asp">SubStep0.asp </a>-- 从「语句区段」到「子程序」Step0 <a
href="Viewasp.asp?FileName=ch04\SubStep0.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep1.asp">SubStep1.asp</a> -- 从「语句区段」到「子程序」Step1 <a
href="Viewasp.asp?FileName=ch04\SubStep1.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep2.asp">SubStep2.asp </a>-- 从「语句区段」到「子程序」Step2 <a
href="Viewasp.asp?FileName=ch04\SubStep2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep3.asp">SubStep3.asp </a>-- 从「语句区段」到「子程序」Step3 <a
href="Viewasp.asp?FileName=ch04\SubStep3.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep4.asp">SubStep4.asp</a> -- 从「语句区段」到「子程序」Step4 <a
href="Viewasp.asp?FileName=ch04\SubStep4.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep5.asp">SubStep5.asp</a> -- 从「语句区段」到「子程序」Step5 <a
href="Viewasp.asp?FileName=ch04\SubStep5.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubStep6.asp">SubStep6.asp </a>-- 从「语句区段」到「子程序」Step6 <a
href="Viewasp.asp?FileName=ch04\SubStep6.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubEx.asp">SubEx.asp</a> -- 用 For 循环读取数组数据, 然后呼叫 IsScorePassed<a
href="Viewasp.asp?FileName=ch04\SubEx.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Fun0.asp">Fun0.asp</a> -- 如何将子程序转换成函数 <a
href="Viewasp.asp?FileName=ch04\Fun0.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Fun1.asp">Fun1.asp </a>-- 呼叫函数 <a
href="Viewasp.asp?FileName=ch04\Fun1.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Fun2.asp?N=100">Fun2.asp?N=100 </a>-- 有返回值的函数 <a
href="Viewasp.asp?FileName=ch04\Fun2.asp">(查看源代码)</a></span></p>
<p style='margin-right:36.0pt;margin-left:36.0pt'><strong><span lang=EN-US
style='color:maroon'>VB 内建函数的实际应用</span></strong></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\NameExp2.asp?Name=asp">NameExp2.asp?Name=asp</a>-- 用 UCase/LCase 函数避免大小写问题<a
href="Viewasp.asp?FileName=ch04\NameExp2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\NameExp3.asp?Name=%20ASP">NameExp3.asp?Name= ASP</a> -- 用 Trim 函数除去不必要的空格<a
href="Viewasp.asp?FileName=ch04\NameExp3.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Books01.asp">Books01.asp</a> -- 用 For 循环输出数组数据 <a
href="Viewasp.asp?FileName=ch04\Books01.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Books02.asp">Books02.asp </a>-- 用 Join 函数简化数组数据的输出 <a
href="Viewasp.asp?FileName=ch04\Books02.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SplitEx.asp?Book=F8308&Book=F8315">SplitEx.asp?Book=F8308&Book=F8315
</a>-- Split 函数与重复性数据的输入 <a href="Viewasp.asp?FileName=ch04\SplitEx.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Replace.asp?Book=F8308&Book=F8315">Replace.asp?Book=F8308&Book=F8315</a>
-- Replace 函数与字串的取代 <a href="Viewasp.asp?FileName=ch04\Replace.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubTab02.asp">SubTab02.asp</a> -- 使用 FormatNumber 函数 <a
href="Viewasp.asp?FileName=ch04\SubTab02.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Average.asp?Name=KJWang&BCC=59.5&ASP=59.5&VB=59.5">Average.asp?Name=KJWang&BCC=59.5&ASP=59.5&VB=59.5
</a>-- 将 CInt 改成 CSng 或 CDbl 函数 <a href="Viewasp.asp?FileName=ch04\Average.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\dice1.asp">dice1.asp</a> -- 可以随机掷出三个骰子 <a
href="Viewasp.asp?FileName=ch04\dice1.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\dice2.asp">dice2.asp</a> -- 可以随机掷出三个骰子 <a
href="Viewasp.asp?FileName=ch04\dice2.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\ChDate.asp">ChDate.asp</a> -- ChineseDate函数, 产生中文格式的日期 <a
href="Viewasp.asp?FileName=ch04\ChDate.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\ChTime.asp">ChTime.asp</a> -- ChineseTime函数, 产生中文格式的时间 <a
href="Viewasp.asp?FileName=ch04\ChTime.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Apply.asp">Apply.asp</a> -- 读取系统日期,利用 DateAdd 函数加上天数 <a
href="Viewasp.asp?FileName=ch04\Apply.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Y2010.asp">Y2010.asp</a> -- 距离公元2010年还有 ?????? 秒 <a
href="Viewasp.asp?FileName=ch04\Y2010.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="ch04\BookList.asp">BookList.asp </a>-- 输出数组数据 <a
href="Viewasp.asp?FileName=ch04\BookList.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\score.asp?Num=3109">score.asp?Num=3109 </a>-- 让同学自行上网查询第一次期中的 ASP 成绩
<a href="Viewasp.asp?FileName=ch04\score.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\2Dtable.asp">2Dtable.asp</a> -- 使用 For-Next 嵌套循环输出二维数组数据<a
href="Viewasp.asp?FileName=ch04\2Dtable.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Week.asp">Week.asp</a> -- 子程序练习 <a
href="Viewasp.asp?FileName=ch04\Week.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\WeekSub.asp">WeekSub.asp </a>-- 将语句区段转换成子程序 <a
href="Viewasp.asp?FileName=ch04\WeekSub.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubTab00.asp">SubTab00.asp </a>-- 使用子程序 <a
href="Viewasp.asp?FileName=ch04\SubTab00.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\SubTab01.asp">SubTab01.asp</a> -- 使用子程序 <a
href="Viewasp.asp?FileName=ch04\SubTab01.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\Fun3.asp">Fun3.asp</a> -- 使用函数 <a
href="Viewasp.asp?FileName=ch04\Fun3.asp">(查看源代码)</a></span></p>
<p style='margin-right:72.0pt;margin-left:72.0pt'><span lang=EN-US><a
href="ch04\ChMonth.asp?n=9">ChMonth.asp?n=9 </a>-- 对应中文月份函数<a
href="Viewasp.asp?FileName=ch04\ChMonth.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 + -