var a = 1;
var b = 2;
var c = a+b;
c will show as 12; but I need 3
How do I do it using jQuery?
This performs the addition of two variables supplied from input variables selected on the basis of ID.
var salary, tds, netSalary;
salary = parseInt($("#txtSalary").val());
$("#txtTds").on('mouseenter focus', function ()
{
tds = parseInt($("#txtSalary").val() * (0.1));
$("#txtTds").val(tds);
});
$("#txtNetSalary").on('mouseenter focus', function () {
netSalary = parseInt($("#txtSalary").val() +("#txtTds").val());
$("#txtNetSalary").val(netSalary);
});