当前位置: 首页 > 图文教程 > 网络编程 > Javascript > JavaScript[对象.属性]集锦之八

Javascript
form中限制文本字节数js代码
use jscript with List Proxy Server Information
use jscript List Installed Software
List Installed Software Features
List Information About the Binary Files Used by an Application
List the Codec Files on a Computer
List the UTC Time on a Computer
List Installed Hot Fixes
excel操作之Add Data to a Spreadsheet Cell
Add Formatted Data to a Spreadsheet
Apply an AutoFormat to an Excel Spreadsheet
JavaScript语法着色引擎(demo及打包文件下载)
类之Prototype.js学习
一款JavaScript压缩工具:X2JSCompactor
iis6+javascript Add an Extension File
jscript之Open an Excel Spreadsheet
jscript之Read an Excel Spreadsheet
jscript之List Excel Color Values
去除图像或链接黑眼圈的两种方法总结
Add a Formatted Table to a Word Document

Javascript 中的 JavaScript[对象.属性]集锦之八


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

string对象


string对象为操作字符串的内容提供了很多方法.


属性

length 字符串的长度,即字符串中字符的个数.


方法

big(),blink(),bold(),fixed(),italics(),small(),sub(),strike(),sup(),fontColor(color),fontSize(size)

以上方法为字符串增加相应的HTML标记.

charAt(index) 返回字符串中index处的字符.

indexOf(searchValue,[fromIndex]) 该方法在字符串中寻找第一次出现的searchValue.如果给定了fromIndex,则从

字符串内该位置开始搜索,当searchValue找到后,返回该串第一个字符的位置.

lastIndexOf(searchValue,[fromIndex]) 从字符串的尾部向前搜索searchValue,并报告找到的第一个实例.

substring(indexA,indexB) 获取自indexA到indexB的子串.

toLowerCase(),toUpperCase() 将字符串中所有字符全部转换成大写,小写.