实现代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#box1{
height: 100px;
width: 200px;
background: #bfa;
border: 2px solid red;
}
</style>
</head>
<body>
<input type="button" id="btn_1" value="按钮">
获取焦点事件:<input type="text" id="input_1">
</body>
<script>
//实现在js代码中绑定事件
//1、获取事件源对象&#