HTML and CSS Reference
In-Depth Information
JavaScript Element
Description
replace(
expression, new
)
Performs a search based on the regular expression
expression
and replaces the
text with
new
search(
expression
)
Performs a search based on the regular expression
expression
and returns the
index number
slice(
begin, end
)
Returns a substring between the
begin
and the
end
index values; the
end
index
value is optional
small()
Displays the string using the small element
split(
separator
)
Splits the string into an array of strings at every occurrence of the
separator
character
strike()
Displays the string using the strike element
sub()
Displays the string using the sub element
substr(
begin, length
)
Returns a substring starting at the
begin
index value and continuing for
length
char-
acters; the
length
parameter is optional
substring(
begin, end
)
Returns a substring between the
begin
and the
end
index values; the
end
index
value is optional
sup()
Displays the string using the sup element
toLocaleLowerCase()
Converts the string to lowercase letters using local standards
toLocaleUpperCase()
Converts the string to uppercase letters using local standards
toLowerCase()
Converts the string to lowercase
toString()
Returns the primitive string value of the string object
toUpperCase()
Converts the string to uppercase
trim()
Returns a copy of the string with all leading and trailing whitespace removed
valueOf()
Returns the value of the string
Styleƒ
A
style
element from the Web page
Properties
disabled
A Boolean indicating whether the element is disabled
media
The media associated with the style
scoped
A Boolean indicating whether the scoped attribute is present with the style
title
The title of the style
type
The value of the
type
attribute for the style sheet
Submitƒ
A
submit
button in a Web form
Properties
alt
The alternative text for the button
defaultValue
The initial value of the button's
value
attribute
disabled
A Boolean indicating whether the element is disabled
form
The name of the form containing the submit button
name
The name of the submit button
type
The type value of the submit button
value
The value of the submit button
Methods
blur()
Removes the focus from the submit button
click()
Clicks the submit button
focus()
Gives the focus to the submit button
handleEvent(
event
)
Invokes the event handler for the specified
event