Saturday 26 March 2016

Write a JavaScript program to illustrate onMouseOver event?

Code:


<!DOCTYPE html>
<html>
<body>
<p>Move the mouse over the button to display an alert box</p>
<button onmouseover="myfunction()">
    Try it
</button>
<script>
    function myfunction()
    {
        alert("This alert box will display only when the mouse move over the button");
    }
</script>

</body>
</html>


Output:


No comments:

Post a Comment