var testStr = "hello kay!";
1、substr
testStr.substr(1) ->ello kay!
testStr.substr(1,4) ->ello (4是长度)
2、substring
testStr.substring(1) ->ello kay!
testStr.substr(1,4) ->ello(4是第4个字符)
posted on 2015-05-26 15:50 欲上云端 阅读(256) 评论(0) 编辑 收藏 举报