动态添加button

<body>  
<script  language="JavaScript">  
<!--  
var  o=document.createElement("input");  
o.type="button";  
o.value="test"  
o.onclick=new  Function("test(this)");  
document.body.appendChild(o);  
function  test(b){  alert(b.value);}  
//-->  
</script>  
</body>

posted on 2006-09-29 19:00  asdsd  阅读(242)  评论(0编辑  收藏  举报

导航