August 19, 2009

Javascript 17: Event Handler

First let's start with some HTML script.

<html>
<head>
</head>

<body>
<form>
<input type ="button">
</form>
</body>
</html>

This will show up a button, a blank one.

<html>
<head>
</head>

<body>
<form>
<input type ="button" onClick ="window.alert('Hello message');">
</form>
</body>
</html>


There is only a single quote because there was a double quote to start off the window.alert. Remember to put the same when you start and close. It will create a javascript popup with the message "hello message".



, ,



Powered by ScribeFire.

No comments:

Post a Comment