Mega Code Archive

 
Categories / JavaScript Reference / Javascript Methods
 

Replace() Example

<html> <body> <button onclick="var myS = new String('Sample String');                   alert(myS.replace(/sam/i,'Text'));">REPLACE</button> </body> </html>