Sample JavaScript with onClick attribute?
>> Wednesday, June 8, 2011
<HTML>
<HEAD>
<TITLE>A First Script</TITLE>
<SCRIPT LANGUAGE = JavaScript>
document.write("Hello World")
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE = Button VALUE = "Click Me" OnClick = "document.write('Hello World')">
//a OnClick is an event that can be applied to buttons
</BODY>
</HTML>
<HEAD>
<TITLE>A First Script</TITLE>
<SCRIPT LANGUAGE = JavaScript>
document.write("Hello World")
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE = Button VALUE = "Click Me" OnClick = "document.write('Hello World')">
//a OnClick is an event that can be applied to buttons
</BODY>
</HTML>
0 comments:
Post a Comment