jquery replace character in string code example
Example 1: jquery replace element
$("elementsSelector").replaceWith( "<h2>New content</h2>" );
Example 2: javascript replace string
var str = "JavaScript replace method test";
var res = str.replace("test", "success");
//res = Javscript replace method success
Example 3: javascript replace
var res = str.replace("find", "replace");