1. var box = document.getElementById('box');
    2. box.onclick = function() {
    3. console.log('代码会在box被点击后执行');
    4. };