Changes

Jump to navigation Jump to search
485 bytes added ,  15:13, 24 November 2022
no edit summary
Line 10: Line 10:  
=='''Training Materials by Application'''==
 
=='''Training Materials by Application'''==
 
<br>
 
<br>
 +
 +
// JavaScript code without any framework
 +
<ref>var myImg = document.getElementById('myImage');</ref>
 +
function myMessage() {
 +
    alert('your message');
 +
}
 +
 +
if (myImg.addEventListener) { //addEventListener is the standard method to add events to objects.
 +
    myImg.addEventListener('mouseover', myMessage, false);
 +
}
 +
 +
else if (myImg.attachEvent) { //For Internet Explorer
 +
    myImg.attachEvent('onmouseover', myMessage);
 +
}
 +
 +
else { //For other browsers
 +
    myImg.onmouseover = myMessage;
 +
}
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"

Navigation menu

GCwiki