JavaScript Tutorial/String/substring
Get the substring out of a string
<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
inpTxt = "Hello there";
alert(inpTxt.substring(0, 5));
// -->
</script>
</head>
<body>
</body>
</html>
String.substring()
Syntax
string.substring(num1, num2)
string.substring(num)