<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<input type = "button" id ="btn1" value = "按钮一">
<script>
function show(){
alert('Hello')
}
var btn1 = document.getElementById('btn1')
btn1.attachEvent('onclick',show());
</script>
</body>
</html>