【JavaScript】click event

説明

滑鼠按下→觸發事件

 

button#btn Click me
#text
btn.addEventListener("click", function(){
 text.textContent="You Clicked me !"
})

Display