js 写入html结构输出 采用 document.write 代码实例运行结果 看到这两行代码,还是感觉很新鲜。一般情况下都是采用html的方式书写页面结构。现在采用js写入html,喜欢的小伙伴,点赞哈。么么哒 代码实例 document.write("<h1>This is a heading</h1>"); document.write("<p>This is a paragraph</p>"); 运行结果