得到的结果是6不是7啊;
var s='hello, world'; var a = s.indexOf(' world') alert(a);
有空格' world'是6,没空格是7
Sign in to make a reply
wwz_hello
得到的结果是6不是7啊;