JavaScript var str = "abcd"; var res = str.substring(1, 3); //bc //參數1是要擷取字串第一字元的位置(Zero based) 參數2是字串最後字元位置+1
確定! 回上一頁