Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
16.5 Check Boxes and Radio Buttons
405
JavaScript Buttons
HTML Element:
 (No End Tag)
Attributes:
NAME
, 
VALUE
, 
ONCLICK
, 
ONDBLCLICK
, 
ONFOCUS
, 
ONBLUR
The 
BUTTON
 element is recognized only by browsers that support JavaScript.
It creates a button with the same visual appearance as a 
SUBMIT
 or 
RESET
button and allows the author to attach JavaScript code to the 
ONCLICK
,
ONDBLCLICK
, 
ONFOCUS
, or 
ONBLUR
 attributes. The name/value pair associated
with a JavaScript button is not transmitted as part of the data when the form
is submitted. Arbitrary code can be associated with the button, but one of the
most common uses is to verify that all input elements are in the proper for 
mat before the form is submitted to the server. For instance, the following
would create a button where the user defined 
validateForm
 function would
be called whenever the button is activated.
onClick="validateForm()">
HTML Element:
HTML Markup
Attributes:
NAME
, 
VALUE
, 
ONCLICK
,
 ONDBLCLICK
, 
ONFOCUS
, 
ONBLUR
This alternative way of creating JavaScript buttons, supported only by
Internet Explorer, lets you use arbitrary HTML markup for the content of
the button. All attributes are used identically to those in 
TYPE="BUTTON" ...>
.
16.5 Check Boxes and Radio 
Buttons
Check boxes and radio buttons are useful controls for allowing the user to
select among a set of predefined choices. While each individual check box
can be selected or deselected individually, radio buttons can be grouped so
that only a single member of the group can be selected at a time.
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved