Javascript events
Javascript is all about cool stuffs displayed in the website. So here we will learn how these cool stuffs happens in the website. This all are the ability of Javascript which increase the user interaction and flash like features.The building blocks of an interactive web page is the JavaScript event system. An event in JavaScript is something that happens with or on the webpage. A few example of events:
- A mouse click
- The webpage loading
- Mousing over a hot spot on the webpage, also known as hovering
- Selecting an input box in an HTML form
- A keystroke
For example:
<html>
<head>
<script type="text/javascript">
<!--
function popup() {
alert("Wow!! I feel good.")
}
//-->
</script>
</head>
<body>
<input type="button" value="Click Me!" onclick="popup()"><br />
<a href="#" onmouseover="" onMouseout="popup()">
Hover Me!</a>
</body>
</html>
Comments
Post a Comment