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

📄 6.htm

📁 javascript book
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>使用内部对象系统</title>
<meta name="Microsoft Theme" content="mstheme5474 011">
</head>

<body background="maizbk.jpg" bgcolor="#FFFFFF" text="#000000" link="#800000" vlink="#000080" alink="#3366CC">

<!--mstheme--><font face="宋体"><!--mstheme--></font>

<table border="0" width="100%">
  <tr>
    <td width="100%">
      <!--mstheme--><font face="宋体">
      <p align="center" style="TEXT-ALIGN: center"><b><font size="4" color="#000000"><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">使用内部对象系统</span></font></b></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><font size="3"><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">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">Web</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"><b>一、浏览器对象层次及其主要作用</b></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'">  除了前面提到过的文档</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">Navigator</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">浏览器中还提供了窗口(</span><span lang="EN-US">Window</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)对象以及历史(</span><span lang="EN-US">History</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)和位置(</span><span lang="EN-US">Location</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%; margin-left: 36pt"><font size="3"><span lang="EN-US" style="FONT-FAMILY: System"><img id="_x0000_i1025" src="Bullet3.gif" width="12" height="12"></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 浏览器对象</span><span lang="EN-US">(Navigator)</span></font></p> 
      <p style="line-height: 150%; margin-left: 36pt"><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%; margin-left: 36pt"><font size="3"><span lang="EN-US" style="FONT-FAMILY: System"><img id="_x0000_i1026" src="Bullet3.gif" width="12" height="12"></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 窗口对象</span><span lang="EN-US">(Windows)</span></font></p> 
      <p style="line-height: 150%; margin-left: 36pt"><font size="3"><span lang="EN-US">Window</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象处于对象层次的最顶端,它提供了处理</span><span lang="EN-US">Navigator</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%; margin-left: 36pt"><font size="3"><span lang="EN-US" style="FONT-FAMILY: System"><img id="_x0000_i1027" src="Bullet3.gif" width="12" height="12"></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 位置对象</span><span lang="EN-US">(Location)</span></font></p> 
      <p style="line-height: 150%; margin-left: 36pt"><font size="3"><span lang="EN-US">Location</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%; margin-left: 36pt"><font size="3"><span lang="EN-US" style="FONT-FAMILY: System"><img id="_x0000_i1028" src="Bullet3.gif" width="12" height="12"></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> 历史对象</span><span lang="EN-US">(History)</span></font></p> 
      <p style="line-height: 150%; margin-left: 36pt"><font size="3"><span lang="EN-US">History</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%; margin-left: 36pt"><font size="3"><span lang="EN-US" style="FONT-FAMILY: System"><img id="_x0000_i1029" src="Bullet3.gif" width="12" height="12"></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></font></p> 
      <p style="line-height: 150%; margin-left: 36pt"><font size="3"><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">(elements)</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%; margin-left: 36pt"><span lang="EN-US"><font size="3">&nbsp;</font></span></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><font size="3"><span lang="EN-US">WWW</span><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">,</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">,</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">,</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但对于我们实现</span><span lang="EN-US">Web</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%"><b><span style="font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman"><font size="3">二、文档对象功能及其作用</font></span></b></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">Navigator</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">6-1</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所示。</span></font></p>
      <!--mstheme--></font>
      <table border="0" cellPadding="0" cellSpacing="1" style="BORDER-BOTTOM: black 0.75pt outset; BORDER-LEFT: black 0.75pt outset; BORDER-RIGHT: black 0.75pt outset; BORDER-TOP: black 0.75pt outset; WIDTH: 313.8pt; mso-cellspacing: .6pt; mso-padding-alt: 4.2pt 4.2pt 4.2pt 4.2pt" width="523">
        <tbody>
          <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 lang="EN-US"><font size="3">Links</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 lang="EN-US"><font size="3">Anchor</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 lang="EN-US"><font size="3">Form</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%">

⌨️ 快捷键说明

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