当前位置: 首页 > 网络学院 > 客户端脚本教程 > JavaScript > JS字符串对象参考

JavaScript
JS 字符串
JS Date
JS数组,JS Array
JS Boolean
JS Math
JS HTML DOM
JS Browser
JS Cookies
JS 校验
JS Animation
JS Image Maps
JS Timing
JS 建立对象
JS 摘要
JS 实例
JS 对象实例
JS DOM 实例
JS数组对象参考
JS布尔对象参考
JS日期对象参考

JavaScript 中的 JS字符串对象参考


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 809 ::
收藏到网摘: n/a

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
将字符串中的某些字符替换成其它字符
1 4 4
search() Searches a string for a specified value
针对某执行值对字符串进行查找
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

评论 (0) All

登陆 | 还没注册?