1.1. 传统的javascript中事件绑定操作
写法一
<input type=”button” id =“btn” value=”按钮” onclick=”fun1()”>
写法二:
Windown.onload=function(){
document.getElementById(“btn”).onclick=function(){
}
};
写法一
<input type=”button” id =“btn” value=”按钮” onclick=”fun1()”>
写法二:
Windown.onload=function(){
document.getElementById(“btn”).onclick=function(){
}
};