How to remove comma from string in jquery with example ?

How to remove comma from string in jquery with example ?

In this post we will give you information about How to remove comma from string in jquery with example ?. Hear we will give you detail about How to remove comma from string in jquery with example ?And how to use it also give you demo for it if it is necessary.

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..

Example:

<html lang="en">

<head>

<title>Jquery remove comma from string</title>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>

</head>

<body>


<script type="text/javascript">


$(document).ready(function() {


var myStr = "Hi, Hardik. How are you?";

myStr = myStr.replace(/,/g, "");

alert(myStr);


});


</script>


</body>

</html>

Hope this code and post will helped you for implement How to remove comma from string in jquery with example ?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs

For More Info See :: laravel And github

Leave a Comment

Your email address will not be published. Required fields are marked *

6  +    =  13

We accept paid advance and paid guest Posting on our Site : Contact US