js基础

来源:互联网 发布:hl线切割锥度编程视频 编辑:程序博客网 时间:2024/06/08 23:39

window.onload = function(){
document.write(“123”);
var s = document.getElementById(“btn1”);
}

document.write引起页面重绘,所以id获取不到对象。

0 0
原创粉丝点击