2012-10-10 28 views

回答

0

使用功能的indexOf():

搜索字符串爲 「歡迎」:

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

ň結果將是:

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

相關問題