Your code works fine for integer values since you are using
parseInt
if you want to make it work for
decimal number s you will have to use
parseFloat()[
^] function.
just replace all the
parseInt
with
parseFloat
in your code, it should work.
a=parseInt(document.getElementById("txtFirstValue").value);
a = parseFloat(document.getElementById("txtFirstValue").value);
similarly for all the textbox values