1.一直点击 document.getElementById(id).οnclick=fucn(); 2.只点击一次 document.getElementById(id).οnclick=function () {fuc();};