javascript output str to browser

In my experience, there are two way to change the browser content.

1. document.getElementById(ojbid).innerHTML = "" to  change the object content

2. document.write("<h1>" + name + "</h1>")  to write str  

原文地址:https://www.cnblogs.com/kevinge/p/1772013.html