NaN
function grandtotal(){ var x = document.getElementById("st").value; var y = document.getElementById("shppng").value; var sum = parseFloat(x, 10)+ parseFloat(y, 10); $('#gt').val(sum.toFixed(2)); }
var sum = 0; if(isNaN(x) || isNaN(y)){ alert('not a number'); } else { sum = parseFloat(x) + parseFloat(y); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)