Javascript examples for String Operation:String Remove
Remove all special characters in <p> tags using JavaScript/jQuery on page load
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(window).load(function(){/*www. j a va2s . c om*/ var string = "this is a'asdf^&&*())) a ssss^ 123123!(^&*&%$^$&%*1 Str!ng@."; $('body').html(string.replace(/[^a-z0-9\s]/gi, '')); }); </script> </head> <body> </body> </html>