ITeye博客

body.appendChild的方法

cyz001 · 2009-09-22 15:38 · js · Markdown


<script>
(function(){
	this.div = document.createElement("div");
	this.div.innerHTML = "never-online";
	document.body.appendChild(div); 
	this.div.onclick = function(){
		alert(this.tagName);
	}
}
)()
</script>
<body>hello</body>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。