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, "");
- How to get product using rakuten marketing api in PHP?
- How to send mail example in Laravel 5?
- How to get current controller name in view Laravel 5?
- Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code
- Codeigniter 3 - select2 ajax autocomplete from database example with demo
- How to Uninstall a Package in Laravel 5 Using Composer Command?
- Laravel 5 login with Linkedin using Socialite Package
- Codeigniter 3 and AngularJS CRUD with Search and Pagination Example.