hello Here simple example of replace single and doble quotes using jquery replace function.
we can use jquery replace function to replace single and double quotes.
example below
jquery replace all single or double quotes
we can pass two parameter to replace single quotes in string
//replace all single quotes
var myStr = myStr.replace(/'/g, '');
//replace all double quotes
var myStr = myStr.replace(/"/g, '');
//or abit of fun, replace single quotes with double quotes
var myStr = myStr.replace(/'/g, '"');
//or vice versa, replace double quotes with single quotes
var myStr = myStr.replace(/"/g, ''');
jquery replace all single or double quotes
we can use jquery replace function to replace single and double quotes.
example below
jquery replace all single or double quotes
we can pass two parameter to replace single quotes in string
//replace all single quotes
var myStr = myStr.replace(/'/g, '');
//replace all double quotes
var myStr = myStr.replace(/"/g, '');
//or abit of fun, replace single quotes with double quotes
var myStr = myStr.replace(/'/g, '"');
//or vice versa, replace double quotes with single quotes
var myStr = myStr.replace(/"/g, ''');
jquery replace all single or double quotes
No comments:
Post a Comment
Thank You For Comment