Showing posts with label widgets. Show all posts
Showing posts with label widgets. Show all posts

Thursday, April 4, 2013

Javascript Form Objects attributes and Methods


Form Object Properties
acceptCharset Sets or returns a list of possible character-sets for the form data
Action Sets or returns the action attribute of a form
Enctype Sets or returns the MIME type used to encode the content of a form
Id Sets or returns the id of a form
Length Returns the number of elements in a form
Method Sets or returns the HTTP method for sending data to the server
Name Sets or returns the name of a form
Target Sets or returns where to open the action-URL in a form

Form Object Methods
reset() Resets the values of all elements in a form
submit() Submits a form

Javascript Mouse and Keyboard Attributes


altKey Returns whether or not the "ALT" key was pressed when an event was triggered
Button Returns which mouse button was clicked when an event was triggered
clientX Returns the horizontal coordinate of the mouse pointer when an event was triggered
clientY Returns the vertical coordinate of the mouse pointer when an event was triggered
ctrlKey Returns whether or not the "CTRL" key was pressed when an event was triggered
metaKey Returns whether or not the "meta" key was pressed when an event was triggered
relatedTarget Returns the element related to the element that triggered the event
screenX Returns the horizontal coordinate of the mouse pointer when an event was triggered
screenY Returns the vertical coordinate of the mouse pointer when an event was triggered
shiftKey Returns whether or not the "SHIFT" key was pressed when an event was triggered

Other Event Attributes
Bubbles Returns a Boolean value that indicates whether or not an event is a bubbling event
Cancelable Returns a Boolean that indicates whether or not an event can be default action prevented
currentTarget Returns the element whose event listeners triggered the event
eventPhase Returns which phase of the event flow is currently being evaluated
Target Returns the element that triggered the event
timeStamp Returns the time stamp, in milliseconds, from the epoch (system start or event trigger)
Type Returns the name of the event