search 方法指明是否存在相應(yīng)的匹配。如果找到一個(gè)匹配,search 方法將返回一個(gè)整數(shù)值,指明這個(gè)匹配距離字符串開始的偏移位置。如果沒有找到匹配,則返回 -1。示例下面的示例演示了 search 方法的用法。function SearchDemo(){ var r, re; // 聲明變量。 var s = "The rain in Spain falls
Please activate JavaScript to enable the search functionality. From here you can search these documents. Enter your search words into the box below and click "search". Note that the search function will automatically search for all of the words. Pages containing fewer words won't appear in th...