JavaScript Reference/Javascript Methods/substring
Версия от 18:30, 25 мая 2010; (обсуждение)
"substring()" Example
<html>
<body>
<button onclick="var myS = new String("Sample String");
alert(myS.substring(4,7));">
substring</button>
</body>
</html>
"substring()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |String |
+----------------+--------------------------------------------------------------+
"substring()" Syntax Parameters and Note
Note:
Returns part of a String object.
Syntax:
stringName.substring(param1, param2)
Parameters:
param1 Required; start index.
param2 Required; end index.