This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.



Smartphone icons created by Freepik - Flaticon

JS HTML Events

The onclick Attribute

Click on this text!

 //"Click on this text" heading
onclick="changeText(this)"

//onclick function
function changeText(id) {
  id.innerHTML = "Ooops!";
}