Sponsored Links
JavaScript Tutorials
- JavaScript Browser Objects Part 2
- JavaScript Frame object
- JavaScript Form Object
- JavaScript FileUpload Object
- JavaScript Event Object Properties and Methods
- JavaScript Event Object
- JavaScript Elements and Embed Objects
- JavaScript Applet Objects
- JavaScript Browser Objects
- JavaScript Object Oriented Features
- JavaScript Window Object Open Method Part 2
- JavaScript Window Object Open Method
- JavaScript Window Object Timeout Methods
- JavaScript Location Object
- JavaScript Location Object Properties
- JavaScript History Object Properties and Methods
- JavaScript Document Object Methods Part II
- JavaScript Document Object Methods Part I
- JavaScript Document Object Properties
- JavaScript Document Object
Tutorials
JavaScriptJavaScript Browser Objects Part 2
JavaScript Browser Objects Part 2
JavaScript Browser Objects Part 2
In this JavaScript tutorial, you will learn about Browser Objects viz button object properties of button object, form, name, value, Methods of button object, checkbox object, properties of checkbox object - checked, defaultChecked, form, name, type, value, Methods of checkbox object - blur(), click() and focus().
button object:
The button object is a browser object in JavaScript that is used to access a form button other than submit or reset. The button object is a property of the form object.
General syntax of button object in JavaScript is as follows:
<INPUT TYPE="button" NAME="some button name" VALUE="some value" onClick="Functionname">
For example:
<INPUT TYPE="button" NAME="Exforsys" VALUE="For Training Click Here!!!" onClick="TrainingFunc">
The above would create a button with a caption on the button:
For Training Click Here!!!
When the button is clicked, the function TrainingFunc is called. The function call is optional and when it is placed, the corresponding function must also be placed.
Properties of button object:
The following are the properties associated with button object:
- form
- name
- value
form:
form property of button object denotes the form object that includes the button.
name:
name property of button object denotes the name of the button.
value:
value property of button object denotes the value of the button that appears on the button.
Methods of button object:
The most commonly used method of button object is the click() method. The click() method invokes when the user clicks the button.
Next Page: JavaScript Checkbox Object
Comments
Sponsored Links
