2011年3月7日
摘要: var Cts = "bblText";if(Cts.indexOf("Text") > 0 ){ alert('Cts中包含Text字符串');}indexOf用法: 返回 String 对象内第一次出现子字符串的字符位置。 strObj.indexOf(subString[, startIndex]) 参数 strObj 必选项。String 对象或文字。 subString 必选项。要在 String 对象中查找的子字符串。 starIndex 可选项。该整数值指出在 String 对象内开始查找的索引。如果省略,则从字符串的 阅读全文
posted @ 2011-03-07 18:47 墟零 阅读(401703) 评论(4) 推荐(4) 编辑