<html>
<head></head>
<body>
<label class="xyz">
<span class="aaaa">Rs. </span>
1,399.00
</label>
<label class="xyz">
<span class="aaaa">Rs. </span>
199.00
</label>
<script>
function deciremove(){
var all = document.getElementsByClassName('xyz');
for(var i=0; i< all.length; i++)
{
var x = all[i].childNodes[2].nodeValue;
x= Math.round(x);
all[i].childNodes[2].nodeValue = x;
}
}
deciremove();
</script>
</body>
</html>
in above code i want Rounding Off Decimals two values, when a value is 199.00 it works well n gives 199 but when 1,399.00 it gives NaN. and this is because of ",". so how do i ignore or delete ",".