How To Remove Comma From String In JQuery?

19-Apr-2021

.

Admin

How To Remove Comma From String In JQuery?

Hi Guys,

In this blog, I will learn you how to remove comma from string in jquery. We will talk about remove comma from string in jquery. This article will give you jquery remove comma from string.

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.

Here I will give you full example for how to remove comma from string using jquery. so let's see the bellow example:

Example


<html lang="en">

<head>

<title>Jquery remove comma from string - NiceSnippets.com</title>

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

</head>

<body>

<script type="text/javascript">

$(document).ready(function() {

var myStr = "Welcome, To NiceSnippets.com";

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

alert(myStr);

});

</script>

</body>

</html>

It will help you....

#Jquery