Showing posts with label To replace special character using JavaScript. Show all posts
Showing posts with label To replace special character using JavaScript. Show all posts

Thursday, September 7, 2017

To replace special character using JavaScript

To replace special character using JavaScript

  function replaceTextBoxValue(mystring) 
{
             return mystring.replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/'/g, "&apos;");
}