Thursday, 7 September 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;");
}

No comments:

Post a Comment