HTML DOM Button Object>>

Button Object

The Button object represents a button in an HTML form. For each instance of an <input type="button"> tag in an HTML form, a Button object is created.

You can access a Button object by indexing the elements array (by number or name) of the corresponding form or by using getElementById().

IE: Internet Explorer, F: Firefox, N: Netscape, W3C: World Wide Web Consortium (Internet Standard).

Button Object Properties

Property Description IE  F N W3C
accessKey Sets or returns the keyboard key to access the button 5     Yes
disabled Sets or returns whether or not the button should be disabled 5 1   Yes
form Returns a reference to the form that contains the button 3 1 2 Yes
id Sets or returns the id of the button 4 1   No
name Sets or returns the name of the button 3 1 2 Yes
tabIndex Sets or returns the index that defines the tab order for the button 5     Yes
type Returns the type of the form element. For a Button object it will be "button" 4 1 3 Yes
value Sets or returns the text that is displayed on the button 3 1 2 Yes

Button Object Methods

Method Description IE F N W3C
blur() Removes focus from the button 3 1 2  
click() Simulates a mouse-click on the button 3 1 2  
focus() Gives focus to the button 3 1 2  

Button Objects Events

Syntax: object.event_name="someJavaScriptCode"

Event Description IE F N W3C
onBlur Executes some code when the button loses focus 3 1 2  
onClick Executes some code when the button is clicked 3 1 2  
onFocus Executes some code when the button gets focus 3 1 2  
onMouseDown Executes some code when a mouse button is pressed 4 1 4  
onMouseUp Executes some code when a mouse button is released 4 1 4  

 

<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006 All Rights Reserved By CodeDcode.Com