Share this post:
Sometimes, we require to remove comma, semicolon, colon etc from string in your jquery code At that time you can simply remove comma using js replace(). Jquery replace() through we can replace comma into empty string that way comma will be remove from jquery string.
In this example you can see how it works. It small thing but helpful because this you can also delete semicolon ,colon ,dot etc. So, let's try bellow example and see..
<title>Jquery remove comma from string</title>
var myStr = "Hi, Hardik. How are you?";
myStr = myStr.replace(/,/g, "");
- Bootstrap Color Picker Example using mjolnic colorpicker plugin
- How to check image loaded or not in JQuery?
- Laravel 5 - How to prevent browser back button after user logout?
- Laravel tokenmismatchexception in verifycsrftoken.php - Solved
- Laravel 5 mailchimp api integration from scratch with example
- Multiple database connections in laravel 5 Application
- Laravel 5 - GEO chart example and demo using lavacharts package
- Laravel 5.2 multi auth example using Auth guard from scratch