我是靠谱客的博主 诚心冷风,这篇文章主要介绍javascript中的document.open()方法使用介绍,现在分享给大家,希望可以做个参考。

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>

最后

以上就是诚心冷风最近收集整理的关于javascript中的document.open()方法使用介绍的全部内容,更多相关javascript中内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(191)

评论列表共有 0 条评论

立即
投稿
返回
顶部