Usuń przecinek w jQuery
var myStr = "hii, hello, welcome";
myStr = myStr.replace(/,/g, "");
console.log(myStr)
// OUTPUT
hii hello welcome
Rht
var myStr = "hii, hello, welcome";
myStr = myStr.replace(/,/g, "");
console.log(myStr)
// OUTPUT
hii hello welcome
<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>