[ javascript ] – 字串查詢 2016 / 6 / 20 jeff 0 [javascript] str="abcde"; str.indexOf(‘b’);//回傳 1 str.indexOf(‘f’);//回傳 -1 查無此字串 [/javascript]