📄 6.htm
字号:
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span lang="EN-US"><font size="3">Method</font></span></p>
<!--mstheme--></font>
</td>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 23%" vAlign="top" width="23%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span lang="EN-US"><font size="3">Prop</font></span></p>
<!--mstheme--></font>
</td>
</tr>
<tr>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 20%" vAlign="top" width="20%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">链接对象</font></span></p>
<!--mstheme--></font>
</td>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 18%" vAlign="top" width="18%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">锚对象</font></span></p>
<!--mstheme--></font>
</td>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 18%" vAlign="top" width="18%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">窗体对象</font></span></p>
<!--mstheme--></font>
</td>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 20%" vAlign="top" width="20%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">方法</font></span></p>
<!--mstheme--></font>
</td>
<td style="BORDER-BOTTOM: black 0.75pt inset; BORDER-LEFT: black 0.75pt inset; BORDER-RIGHT: black 0.75pt inset; BORDER-TOP: black 0.75pt inset; PADDING-BOTTOM: 4.2pt; PADDING-LEFT: 4.2pt; PADDING-RIGHT: 4.2pt; PADDING-TOP: 4.2pt; WIDTH: 23%" vAlign="top" width="23%">
<!--mstheme--><font face="宋体">
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3">对象</font></span></p>
<!--mstheme--></font>
</td>
</tr>
</tbody>
</table>
<!--mstheme--><font face="宋体">
<p style="line-height: 150%; margin-left: 216pt"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图</span><span lang="EN-US">6</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">-</span><span lang="EN-US">1
document</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 从图</span><span lang="EN-US">6-1</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中可以看出,</span><span lang="EN-US">document</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象的主要作用就是把这些基本的元素(如</span><span lang="EN-US">links,anchor</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等)包装起来,提供给编程人员使用。从另一个角度看,</span><span lang="EN-US">document</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象中又是由属性和方法组成。</span></font></p>
<p style="line-height: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><font size="3"> </font></span></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">1、</span><span lang="EN-US">document</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中三个主要的对象</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span><span lang="EN-US">document</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中主要有:</span><span lang="EN-US">links,anchor,form</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等三个最重要的对象:</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(1)</span><span lang="EN-US">anchor</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">锚对象:</span></font></p>
<p style="line-height: 150%"><span lang="EN-US"><font size="3">anchor</font></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象指的是</span><span lang="EN-US"><A
Name=...> </A></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">标识在</span><span lang="EN-US">HTML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">源码中存在时产生的对象。它包含着文档中所有的</span><span lang="EN-US">anchors</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">信息。</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(2)链接</span><span lang="EN-US">links</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> </span><span lang="EN-US">link</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象指的是用</span><span lang="EN-US"><A
Href=...> </A></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">标记的连接一个超文本或超媒体的元素作为一个特定的</span><span lang="EN-US">URL</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(3)窗体(</span><span lang="EN-US">Form</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)对象</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 窗体对象是文档对象的一个元素,它含有多种格式的对象储存信息,使用它可以在</span><span lang="EN-US">JavaScript</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">脚本中编写程序进行文字输入,并可以用来动态改变文档的行为。通过</span><span lang="EN-US">document.
Forms[]</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数组来使得在同一个页面上可以有多个相同的窗体</span><span lang="EN-US">,</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用</span><span lang="EN-US">forms[]</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数组要比使用窗体名字要方便得多。</span></font></p>
<p style="line-height: 150%"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例</span><span lang="EN-US">:</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面就是一个使用窗体数组和窗体名字的例子。该程序使得两个窗体中的字段内容保持一致。</span></font></p>
<p style="line-height: 150%"><span lang="EN-US"><font size="3">Test6_1.htm</font></span></p>
<p style="line-height: 150%"><span lang="EN-US"><font size="3"><Html></font></span></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -