Button On Click Action : JavaScript DHTML examples (example source code) » Form Control » Button

JavaScript DHTML
C++
Java Products
Java Articles
JavaScript DHTML Home  »   Form Control   » [  Button  ]   
 



Button On Click Action

Please note that some example is only working under IE or Firefox.

/*
JavaScript: A Beginner's Guide, Second Edition
By John Pollock

Publisher: McGraw-Hill, 

Published December 2003, 550 pages, 
ISBN 0072227907
*/
<HTML>

<HEAD>

</HEAD>

<BODY>

<FORM>
<INPUT TYPE="button" value="Page Resource" onClick="window.location='http://www.pageresource.com'">
<P>
<INPUT TYPE="button" value="JavaScript City" onClick="window.location='http://www.javascriptcity.com'">
<P>
<INPUT TYPE="button" value="Yahoo! Web Site" onClick="window.location='http://www.yahoo.com'">
<P>
<INPUT TYPE="button" value="Netscape Web Site" onClick="window.location='http://www.netscape.com'">
<P>
<INPUT TYPE="button" value="Microsoft Web Site" onClick="window.location='http://www.microsoft.com'">
</FORM>

</BODY>

</HTML>
Related examples in the same category
1.  Using the onSubmit Event to Cancel a Form Submission (Internet Explorer)
2.   HTML Form with onClick Code
3.  Button set Textfield value
4.  Button click to display dialog
5.  Button Redirect
6.  Create a button
7.  Button to display the name of the form
8.  Button to display the names of all the elements in a form
9.  Animating Buttons with JavaScript
10.   Roll over one of our images.
11.  Button and Check Box Event Handling
12.  JavaScript Button action event
13.  Three Buttons Sharing One Function
14.   Running a Script from User Action
15.  Methods and Properties of the Button Object
16.  Putting Script Directly in the onclick Event Handler
17.  Toggle button with hand cursor and image
18.  Button Click action
19.  Button timeout








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.