JavaScript HTML DOM Events
Examples of HTML events:
- When a user clicks the mouse
- When a web page has loaded
- When an image has been loaded
- When the mouse moves over an element
- When an input field is changed
- When an HTML form is submitted
- When a user strokes a key
examples:
<h1 onclick="this.innerHTML = 'Ooops!'">Click on this text!</h1>
or:
<h1 onclick="changeText(this)">Click on this text!</h1>
<script>
function changeText(id)
{
id.innerHTML = "Ooops!";
}
Created with the Personal Edition of HelpNDoc: Full-featured multi-format Help generator