【JavaScript】click event

説明

滑鼠按下→觸發事件

 

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

Display

Leave a Reply

Your email address will not be published. Required fields are marked *