2012-10-10 32 views

回答

0

使用功能的indexOf():

搜索字符串为 “欢迎”:

var str="Hello world, welcome to the universe."; 
var n=str.indexOf("welcome"); 

ň结果将是:

该方法返回-1如果搜索值不存在。

相关问题