string.substring(indexA, [indexB])
下面是参数的详细信息:
-
indexA : 介于0和1小于字符串的长度的整数。
-
indexB : (可选)介于0和字符串的长度的整数。
-
substring方法返回基于给定参数的新的子字符串。
Javascript String substring() Method
这将产生以下结果:
(1,2): p (0,10): Apples are (5): s are round, and apples are juicy.



