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, "");
- Simple PHP Ajax Form Validation Example from scratch
- Codeigniter 3 - select2 ajax autocomplete from database example with demo
- How to set ANDROID_HOME environment variable in ubuntu?
- How to create authentication(login and registration) in Laravel 5.2?
- Group by year month example in Laravel 5 using Query Builder
- Laravel 5 manual pagination with array example
- AngularJS - convert comma separated string to array example
- How to use login throttle in laravel 5?