Open main menu
Home
Random
Log in
Settings
About wiki
Terms and conditions of use
wiki
Search
Changes
← Older edit
Newer edit →
M365/Home-ENG-Test
(view source)
Revision as of 15:13, 24 November 2022
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"
Thian.zanniatlaizo
6,030
edits