document.getElementById(id).onclick = function(){code}

Description
이벤트 핸들러 코드를추가한다.