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

📄 传统文档对象测试.htm

📁 javascript 核心技术 eval()函数的使用 DOM2 事件模型 非标准事件绑定 图片跟随鼠标 传统文档对象测试
💻 HTM
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>传统文档对象测试</title>
    <meta http-equiv="content-type" content="text/html;charset=gb2312" />

    <script type="text/javascript" language="javascript">
    <!--
      function showProps()
      {
     var i;
     document.write("<h4 align='center'>文档对象属性</h4><hr/>");
     document.write("<h5>基本页面属性</h5>");
     document.write("位置="+document.location+"<br>");
     document.write("URL="+document.URL+"<BR>");
     document.write("文档标题="+document.title+";&nbsp");
     document.write("文档最后编辑时间="+document.lastModified);
     document.write("<h5>页面颜色</h5>");
     document.write("背景颜色="+document.bgColor+";&nbsp");
     document.write("文本颜色="+document.fgColor+";&nbsp");
     document.write("链接颜色="+document.linkColor+";&nbsp");
     document.write("已的访问的颜色="+document.vlinkColor+";&nbsp");
     document.write("活动链接颜色="+document.alinkColor+";&nbsp");
     if(document.links.length>0)
     {
        document.write("<h5>链接</h5>");
        document.write("# 链接数="+document.links.length+";&nbsp");
        for(i;i<document.links.length;i++)
        {
          document.write("Links["+i+"]="+document.links[i]+";&nbsp");
        }
        if(document.anchors.length>0)
        {
           document.write("<h5>锚</h5>");
           document.write("#锚数="+document.anchors.length+";&nbsp");
           for(i=0;i<document.anchors.length;i++)
           document.write("Anchors["+i+"]="+document.anchors[i]+";&nbsp");
           
          
        }
         if(document.forms.length>0)
           {
            document.write("<h5>表单</h5>");
            document.write("#表单数="+document.forms.length+";&nbsp");
            for(i=0;i<document.forms.length;i++)
            document.write("Forms["+i+"]="+document.forms[i].name+";&nbsp");
            
           }
     }
     }
    //--></script>

</head>
<body bgcolor="silver" text="green" link="red" alink="olive">
    <h4 align="center">
        测试文档</h4>
    <hr />
    <center>
        <a href="http://www.scnu.edu.cn" style="text-decoration: none;">华南师范大学</a> <a name="anchor1">
        </a>
        <a name="anchor2" href="http://www.hstc.edu.cn" style="text-decoration: none;">韩山师范学院</a>
    </center>
    <form name="form1" id="form1" action="#" method="get">
    </form>
    <form name="form2" id="form2" action="#" method="get">
    </form>
    <hr />

    <script type="text/javascript" language="javascript">
<!--
   showProps();
//-->
    </script>

</body>
</html>

⌨️ 快捷键说明

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