java4all@1986 java. Powered by Blogger.

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>


0 comments:

Post a Comment

FaceBook Login

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

HTML/JAVASCRIPT

Total Pageviews

STATCOUNTER

  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP