日期:2014-05-16  浏览次数:20355 次

document的三个方法我怎么没见体现出来啊?郁闷。。。。。
我本来想测试一下document对象的三个方法,可未发现这三个方法有什么作用,除了writeln之外,,
代码如下:

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   HTML   4.01   Transitional//EN "   "http://www.w3.org/TR/html4/loose.dtd ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=UTF-8 ">
<title> Insert   title   here </title>
</head>
<body   BGCOLOR= "#FF0000 "   FGCOLOR= "#000000 "   LINK= "#0000FF ">

<P>
这是一个段落
</P>
<button   onclick= "document.clear(); "> CLEAR </button>
<button   onclick= "document.writeln( 'by   documetn   write '); "> WRITE </button>

<button   onclick= "document.close(); "> CLOSE </button>


</body>
</html>

试问,clear方法和close方法怎么体现出来的?

------解决方案--------------------
clear 目前尚未支持。
close 关闭输出流并强制将数据发送到显示。