Jquery 字符串操作

 1 截取字符串
//lastIndexOf();http://www.w3school.com.cn/js/jsref_lastIndexOf.asp
//substring();http://www.w3school.com.cn/js/jsref_substring.asp

2 查询指定字符串
var str="Hello world!"

document.write(str.search("H") + "<br />")
document.write(str.search("World") + "<br />")
document.write(str.search("woorld") + "<br />")


posted @ 2013-01-08 03:15  王超_cc  阅读(246)  评论(0编辑  收藏  举报