<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
window.onload=function(){
var oBtn=document.getElementById('btn');
//oBtn.onclick=show();//加括号立即执行
//oBtn.onmouseover=show;正确;
oBtn.onclick=function(){
show();
}//正确;
function show(){
alert('1');
}
}
</script>
</head>
<body>
<input type="button" value="按钮" id="btn"></input>
</body>
</html>