<body>
<div id="box">
<input type="button" id="btn" value="按钮"/>
</div>
<script>
var btn=document.getElementById('btn');
function in1(){
alert('in');
}
btn.onclick=function in1();
//btn.onmouseover=function in();
</script>
</body>
in1( )函数已经写好了,在直接调用!
直接btn.onclick = in1; 就行了