document.getElementById('元素id').onclick = function () {点击后的事件};