document.write 是js中document对象中的一个方法
使用方法 document.write("你好")
document.write直接重绘整个页面 页面上输出你好
innerHTML是js中操作dom元素的一种方式是在页面指定位置进行原生添加操作
var element = document.getElementById("myDiv");
element.innerHTML = "New content";
document.write在使用的时候不需要指定位置
innerHTML在使用的时候需要指定位置 比document.write更加灵活