dalton.lesko088
Baseband Member
- Messages
- 55
- Location
- USA
why wont my javascript execute this the right way?
say income's value is 20000. it says that tax (20000*.1) is -3500 and therefore net income is 23500 when tax should be 2000 and net income should be 18000... i dont get it.var tax1= ($("income").value*.1);
if(income <= 20000) {
$("Results").value="First Name:" + " " + $('FName').value + "\n" + "\n" +
"Last Name:" + " " + $('LName').value + "\n" + "\n" +
"Phone Number:" + " " + $('phone').value + "\n" + "\n" +
"Zip Code:" + " " + $('zip').value + "\n" + "\n" +
"Email Address:" + " " + $('email').value + "\n" + "\n" +
"YOB:" + " " + $('year').value + "\n" + "\n" +
"Social:" + " " + $('social').value + "\n" + "\n" +
"Income:" + " " + $('income').value + "\n" + "\n" +
"Tax:" + " " + tax1 + "\n" + "\n" +
"Net Income:" + " " + ($("income").value-tax1);
};
Last edited: