<body>
<button id="btn">按钮</button>
<script>
var btn1=document.getElementById("btn");
if(btn1.addEvetLisner){
btn1.addEventLisner("click",demo)
}
else if(btn1.attachEvent("onClick",demo{
btn1.attachEvent("onClick",demo);
}else{
btn1.onclick=demo();
}
fuction demo(){
alert("Hello");
}
</script>
</body
我母鸡啊
我母鸡啊
手插口袋_
相关分类