<input type="button" id="target" onclick="alert('Hello world, '+document.getElementById('target').value);" value="button" />


<input type="button" onclick="alert('Hello world, '+this.value);" value="button" />


이벤트를 그대로 삽입



'오락기 > js' 카테고리의 다른 글

add eventListener  (0) 2017.04.18
property event  (0) 2017.04.18
jQuery node  (0) 2017.04.18
append remove replace node  (0) 2017.04.18
node + callback  (0) 2017.04.18

+ Recent posts