ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: JavaScript :: JS×Ö·û´®¶ÔÏó²Î¿¼

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

JavaScript
JSÊýѧ¶ÔÏó²Î¿¼
JS×Ö·û´®¶ÔÏó²Î¿¼
JSº¯Êý²Î¿¼
JSʼþ²Î¿¼
Javascript ³£ÓÃÕ..
FFºÍIEϵÄjs¼æÈÝ..
jQuery ¼òµ¥½éÉÜ
jQuery / ºËÐÄ / ..
jQuery / ºËÐÄ / ..
ÈçºÎʹÓÃJSÀ´ÅжÏ..
JavascriptÔÚIEºÍ..
3¸öjs×Ö·û±àÂ뺯Ê..
javascript ÖÐµÄ ..

JS×Ö·û´®¶ÔÏó²Î¿¼


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:10565 :: ::

String Object Methods
×Ö·û´®¶ÔÏó·½·¨

FF: Firefox, N: Netscape, IE: Internet Explorer
FF:»ðºü£¬N:Íø¾°£¬IE

Method
·½·¨
Description
ÃèÊö
FF N IE
anchor() Creates an HTML anchor
½¨Á¢Ò»¸öHTMLê¼Ç
1 2 3
big() Displays a string in a big font
ÏÔʾ´óÒ»ºÅµÄ×Ö·û´®
1 2 3
blink() Displays a blinking string
ÏÔʾÉÁ˸µÄ×Ö·û´®
1 2  
bold() Displays a string in bold
ÏÔʾ´ÖÌå×Ö·û´®
1 2 3
charAt() Returns the character at a specified position
ÏÔʾָ¶¨Î»ÖõÄ×Ö·û
1 2 3
charCodeAt() Returns the Unicode of the character at a specified position
·µ»ØÖ¸¶¨Î»ÖÃ×Ö·ûµÄUnicode
1 4 4
concat() Joins two or more strings
½ÓºÏÁ½Ìõ»ò¶àÌõ×Ö·û´®
1 4 4
fixed() Displays a string as teletype text
µç±¨ÐÎʽÀ´ÏÔʾÎÄ×Ö
1 2 3
fontcolor() Displays a string in a specified color
Ö´ÐÐÏÔʾ×Ö·û´®µÄÑÕÉ«
1 2 3
fontsize() Displays a string in a specified size
Ö¸¶¨ÏÔʾ×Ö·û´®µÄ´óС
1 2 3
fromCharCode() Takes the specified Unicode values and returns a string
»ñȡָ¶¨µÄUnicodeÖµ²¢·µ»Ø×Ö·û´®
1 4 4
indexOf() Returns the position of the first occurrence of a specified string value in a string
·µ»Ø×Ö·û´®ÖеÚÒ»¸ö³öÏÖÖ¸¶¨×Ö·û´®µÄλÖÃ
1 2 3
italics() Displays a string in italic
ÓÃбÌåÏÔʾ×Ö·û´®
1 2 3
lastIndexOf() Returns the position of the last occurrence of a specified string value, searching backwards from the specified position in a string
·µ»Ø×Ö·û´®ÖÐ×îºó¸ö³öÏÖÖ¸¶¨×Ö·û´®µÄλÖã¬ËÑË÷·½ÏòÊÇÏòºóµÄ¡£
1 2 3
link() Displays a string as a hyperlink
×Ö·û´®ÒÔ³¬¼¶Á´½ÓµÄÐÎʽÏÔʾ
1 2 3
match() Searches for a specified value in a string
ÔÚ×Ö·û´®ÖвéÕÒÖ¸¶¨Öµ
1 4 4
replace() Replaces some characters with some other characters in a string
½«×Ö·û´®ÖеÄijЩ×Ö·ûÌæ»»³ÉÆäËü×Ö·û
1 4 4
search() Searches a string for a specified value
Õë¶ÔijִÐÐÖµ¶Ô×Ö·û´®½øÐвéÕÒ
1 4 4
slice() Extracts a part of a string and returns the extracted part in a new string
½«²¿·Ö×Ö·û³é³ö²¢ÔÚеÄ×Ö·û´®Öзµ»ØÊ£Óಿ·Ö
1 4 4
small() Displays a string in a small font
ÏÔʾСһºÅµÄ×Ö·û´®
1 2 3
split() Splits a string into an array of strings
½«×Ö·û´®·ÖÅäΪÊý×é
1 4 4
strike() Displays a string with a strikethrough
×Ö·û´®ÒÔɾ³ýµÄÐÎʽÏÔʾ
1 2 3
sub() Displays a string as subscript
×Ö·û´®ÏÔʾ³Éϱê
1 2 3
substr() Extracts a specified number of characters in a string, from a start index
´Ó×Ö·û´®Í·²¿¿ªÊ¼³éȡָ¶¨Êý×ÖµÄ×Ö·û´®
1 4 4
substring() Extracts the characters in a string between two specified indices
³éÈ¡×Ö·û´®ÖÐÖ¸¶¨Êý×Ö·û£¬²¢·µ»ØÊ£ÏµÄ
1 2 3
sup() Displays a string as superscript
Éϱê×Ö·û´®
1 2 3
toLowerCase() Displays a string in lowercase letters
Сд×Ö·û´®
1 2 3
toUpperCase() Displays a string in uppercase letters
´óд×Ö·û´®
1 2 3
toSource() Represents the source code of an object
ÏÔʾ¶ÔÏóµÄÔ´´úÂë
1 4 -
valueOf() Returns the primitive value of a String object
·µ»Ø×Ö·û´®¶ÔÏóµÄԭʼֵ
1 2 4


String Object Properties
×Ö·û´®¶ÔÏóÊôÐÔ

Property
ÊôÐÔ
Description
ÃèÊö
FF N IE
constructor A reference to the function that created the object
Ëù½¨Á¢¶ÔÏóº¯ÊýµÄ²Î¿¼
1 4 4
length Returns the number of characters in a string
·µ»Ø×Ö·û´®µÄ×Ö·û³¤¶È
1 2 3
prototype Allows you to add properties and methods to the object
¶ÔÏó¿É¼ÓÈëµÄ¶ÔÏóºÍ·½·¨
1 2 4

ÆÀÂÛ (2) 1 All