The following is a small list that describes how to attach event handlers to html objects using the document object model separating code from content.
Onload
window.onload = function()
{
:::script:::
}
OnMouseOver
var contentDiv = document.getElementById('content');
contentDiv.onmouseover = function()
{
:::script:::
}
Similarly OnMouseOut
contentDiv.onmouseout= function()
{
:::script:::
}


Thu, Jul 24, 2008
Code, JavaScript