my name is Ahmed and I have a page that contains a textarea and a button to send data in the textarea via Ajax after clicking but I want to replace some strings before sending and the strings are , ­, &, <
and more in the JS code
$('#CT').click(function(){
var textarea=$('#ed_level_2');
textarea.val(textarea.val().replace(/&/g,"").replace(/</g,"").replace(/>/g,"").replace(/"/g,"").replace(/–/g,"").replace(/—/g,"").replace(/ /g,"").replace(/ /g,"").replace(/ /g,"").replace(/­/g,"").replace(/©/g,"").replace(/™/g,"").replace(/®/g,""));
});
I am looked at some sites and I can not find a way to replace more than two strings Such as the code at the bottom
finalurl.replace(/and/g, '&').replace(/eq/g, '=');
replaceis a string method in this case, which is vanilla javascriptval()you retrieve?