📄 传统文档对象测试.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+"; ");
document.write("文档最后编辑时间="+document.lastModified);
document.write("<h5>页面颜色</h5>");
document.write("背景颜色="+document.bgColor+"; ");
document.write("文本颜色="+document.fgColor+"; ");
document.write("链接颜色="+document.linkColor+"; ");
document.write("已的访问的颜色="+document.vlinkColor+"; ");
document.write("活动链接颜色="+document.alinkColor+"; ");
if(document.links.length>0)
{
document.write("<h5>链接</h5>");
document.write("# 链接数="+document.links.length+"; ");
for(i;i<document.links.length;i++)
{
document.write("Links["+i+"]="+document.links[i]+"; ");
}
if(document.anchors.length>0)
{
document.write("<h5>锚</h5>");
document.write("#锚数="+document.anchors.length+"; ");
for(i=0;i<document.anchors.length;i++)
document.write("Anchors["+i+"]="+document.anchors[i]+"; ");
}
if(document.forms.length>0)
{
document.write("<h5>表单</h5>");
document.write("#表单数="+document.forms.length+"; ");
for(i=0;i<document.forms.length;i++)
document.write("Forms["+i+"]="+document.forms[i].name+"; ");
}
}
}
//--></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 + -