JavaScript objects and array reference Encyclopedia 4

Source: Internet
Author: User
Tags array italic font reference reset
Javascript| Reference | objects | Array useragent user and Agent header text sent by client to server

Method

javaenabled JavaScript does not currently have this method, but will soon add that it will see if the browser is compatible with JavaScript, and if so, continue to see if JavaScript is supported.

b.22 Options Array

The array is a property of the Select object, a list of all options (<OPTION>) in the selection box.

Property

Default options in the list of defaultselected options
Index position of an option in the Index options list
Number of options in the length option list (<OPTIONS>)
The name of the list of name options (name attribute)
Selected a Boolean type value that indicates whether an option <OPTION> is selected in the list of options
Index of <OPTION> selected in the list of SelectedIndex options (location)
Text after <OPTION> tag in the text options list
value= attribute in list of value options

B.23 Password Object

It is a property of the Document object, a <input type= "PASSWORD" > tag.

Property

Default value of DefaultValue password object (value= attribute)
Name (name= attribute) of the name object
Value the current value of the field is initially the same as the value= attribute (defauttvalue), but if the script modifies the value in that field, the value changes

Method

Focus moves the focal point away from the field


Blur move focus to this field
Select Choose Input Area

B.24 Radio Object

It is a property of a Form object, a set of radio buttons (option buttons) (<input type= "RADIO" >) in the Body of the window.

Property

Checked the status of a check box or option button (radio button)
Defaultchecked the default state of a check box or option button (radio button)
Length The number of buttons in a set of radio buttons
Name (name= attribute) of the name object
Value Value= Property
Method
Click Simulate mouse button
Event handlers
OnClick Click

b.25 Reset Object

It is a property of the form object, the Reset button (<input type= "reset" >).

Property

Name (name= attribute) of the name object
Value Value= Property
Method
Click Simulate mouse button
Event handlers
OnClick Click

b.26 Select Object

It is a property of the Form object, the selection box (<SELECT>).

Property

Number of options in the length option list (<OPTIONS>)


The name of the list of name options (name attribute)
Number of options in the Options list
Index of <OPTION> selected in the list of Selectedlndex options (location)
Text after marking in the Text option list (option)
value= attribute in list of value options
Method
Blur removes focus from the list of options
Focus moves to the list of options
Event handlers
Event when Onblur loses focus
onchange changes
Onfocus Spotlight Event

B.27 String Object

It is not a property of another object, but rather a built-in object, that is, a string of character string input scripts must be enclosed in quotation marks.

Property

Number of characters in length string
Method
Anchor () is used to convert the string into an HTML anchor tag (<a name=>).
Big () turns the text in the string into a large font (<BIG>)
Blink () changes the text in the string to a blinking font (<BLINK>)
Bold () turns the text in the string into a black font (<B>)
CharAt () looks for a character at the specified position in the string
Fixed () turns the text in the string into a constant spacing font (<TT>)
FontColor () Change the color of text in a string (<font color=>)
FontSize () changes the text in the string to the specified size (<FONTSIZE=>)
IndexOf () is used to search for a special character in the string and returns the index position of the character
Italics () The text in the string into a italic font (<I>)
Lastlndexof () is similar to indexof, but searches backwards for the last occurrence of the character
Link () is used to convert strings to HTML link tags (<a href=>)
Small () turn text in a string into a small font (<SMALL>)
Strike () The text in the string into a crossed font (<STRIKE>)
Sub () To turn text in a string into subscript (subscript) font (sub>)
SUBSTRING () returns a portion of the string between the specified positions in the string



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.