javascript中的document.open()方法使用介绍

时间:2013-10-09    点击:137   
document.open()方法打开一个新的文档,并用document.write()方法编写文档的内容,然后用document.close()方法关闭文档操作,使其内容显示出来。

例如:
复制代码 代码如下:

<script type="text/javascript">
window.onload=hello;
function hello(){
var msg = "JavaScript真好玩!";
document.open();
document.write(msg);
document.close();
}
</script>
JS实现程序暂停与继续功能代码解读
js切换光标示例代码
jquery获取div距离窗口和父级dv的距离示例
jquery中常用的SET和GET$(”#msg”).html循环介绍
JavaScript动态创建div属性和样式示例代码
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved