function myFunction()
{
document.getElementById("demo").innerHTML="Hello World";
}
Doubleclick this paragraph to trigger a function.
Onmousedown
function myFunction(elmnt,clr)
{
elmnt.style.color=clr;
}
sfgg.
Onmousemove
function myFunction(e)
{
x=e.clientX; y=e.clientY; coor="Coordinates: (" + x + "," + y + ")"; document.getElementById("demo").innerHTML=coor } function clearCoor()
{
document.getElementById("demo").innerHTML="";
}
Onmouseover
function bigImg(x)
{
x.style.height="64px";
x.style.width="64px";
} function normalImg(x)
{
x.style.height="32px";
x.style.width="32px";
}
Onkeydown
function myFunction()
{
alert("You pressed a key inside the input field");
}
Onkeyup
function myFunction()
{
var x=document.getElementById("fname");
x.value=x.value.toUpperCase();
}
Enter your name:
Onload
function myFunction()
{
alert("Page is loaded");
}
Hello World!
Onresize
function myFunction()
{
var w=window.outerWidth; var h=window.outerHeight; var txt="Window size: width=" + w + ", height=" + h; document.getElementById("demo").innerHTML=txt; }
Onblur
function myFunction()
{
var