How to Remove Comma from String in JQuery?
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, "");
We are Recommending you
- How to Download File using JQuery?
- Jquery Moment Convert String to Date Example
- JQuery Moment JS Subtract Hours to Datetime Example
- JQuery Disable Submit Button on Click to Prevent Multiple Form Submits
- How to Remove Empty or Null Values from Array in JQuery?
- How to Disable Right Click Menu using JQuery?
- How to Remove All Whitespace from String in JQuery?
- File Upload with Progress Bar using jQuery Ajax and PHP Example
- How to Check Image Loaded or Not in JQuery?
- How to Remove undefined Value from Array in JQuery?
- Automatically Scroll to Bottom of Div JQuery Example
- Check and Uncheck All Checkbox using JQuery Example
- How to Allow Only One Checkbox Checked at a Time in JQuery?
- How to Check Object is Empty or Not in JQuery?
- Autocomplete with Images and Custom HTML Code in Jquery UI?