HTML and CSS Reference
In-Depth Information
JavaScript Element
Description
Boolean
A Boolean value created with the object constructor
new Boolean()
Methods
toString()
Returns the text string true or false depending on the Boolean value
valueOf()
Returns the Boolean value
Button
A push button in an HTML form
Properties
align
The alignment of the element, for example, “right”
disabled
A Boolean indicating whether the element is disabled
enabled
A Boolean indicating whether the button is enabled
form
The name of the form containing the button
formAction
The action associated with the form button
formEnctype
The encoding type associated with the form button
formMethod
The method associated with the form button
formNoValidate
The validation property of the form button
formTarget
The target associated with the form button
name
The name of the button element
size
The width of the button in pixels
type
The value of the type attribute of the button
value
The value of the button element
Methods
blur()
Removes focus from the button
click()
Emulates the action of clicking the button
focus()
Gives focus to the button
Canvas
A canvas element used in the Web document
Properties
height
The height of the canvas
width
The width of the canvas
Methods
getContext( id [, args ])
Returns an object that you can draw into the canvas where id is the object id and
args are arguments associated with the drawing
toDataURL([ type ] [, args ])
Returns the contents of the canvas bitmap as data, where type specifies the MIME
type and args are arguments associated with the image
CanvasGradient
An object representing a color gradient in the canvas
Methods
addColorStop( offset , color ) Sets a color stop at the specified offset with the specified color
CanvasRenderingContext2D An object used for canvas drawing
Properties
Canvas
The canvas on which the object will be used
fillStyle
The color fill, pattern, or gradient used with the object
font
The font used by object text
globalAlpha
The transparency of every object in the canvas
globalCompositeOperation
The technique by which pixels being rendered on the canvas are composited with
pixels preexisting on the canvas
Search WWH ::




Custom Search