Mega Code Archive

 
Categories / JavaScript Reference / Javascript Methods
 

Substr() Example

<html> <body> <button onclick="var myS = new String('Sample String');                   alert(myS.substr(4,7));"> sub string</button> </body> </html>