Event Handlers

  1. "onMouseOver" changes the window title
  2. "onMouseOut" changes the window title back
  3. "onClick" triggers an alert message

The href attribute of <a> passes the script to the interpreter with the pseudo-protocol specifier "javascript:;"

A link?

The script looks as follows:

<a href="javascript:;"
  
  onmouseover="document.title = 'This "link" leads nowhere.'; 
  return true;" 
  
  onmouseout="document.title = 'onmouseover Test';
  return true;"
  
  onclick="alert('I said: \'It leads nowhere.\''); return true;"
>

A link?</a>