trying to get this html to calculate tax values useing a js

trying to get this html to calculate tax values, useing a js library file,

   <script type=\"text/javascript\">
{
var number;
function Icometace(income, itemized)
// Assynes: income .=0, itemzed .=0
// Returns: flat tax (13%) due after deductions
{
var deduction, taxableIcome, total tax;
deduciton= Math.max(itermized, 4150):
taxableIncome = Math.max(income - debuction, o);
toatltax = 0.13*tableTincome
return totaltax;
}

*^js code***\\/ html code*

<html>
<head>
<title> taxes </title>
<script type=\"text/javascript\">
{
var number;
function Icometace(income, itemized)
// Assynes: income .=0, itemzed .=0
// Returns: flat tax (13%) due after deductions
{
var deduction, taxableIcome, total tax;
deduciton= Math.max(itermized, 4150):
taxableIncome = Math.max(income - debuction, o);
toatltax = 0.13*tableTincome
return totaltax;
}
}
</script>
</head>
<body>
<div style=\"text-align:center\">
<h2>taxes</h2>
<p>
click to compute
</p>
<input type=\"button\" value=\"income 100000.00\" onclick=\"itemized (12017.50);\">
<input type=\"button\" value=\"income 42500.00\" onclick=\"itemized(8900.99);\">
<input type=\"button\" value=\"income 13267.45\" onclick=\"itemized(14000.00);\">
<hr>
<div id=\"outputDiv\"></div>
</div>
</body>
</html>

Solution

<html>
<head>
<title> taxes </title>
<script type=\"text/javascript\">
{
var number;
function itemized(income)
// Assynes: income .=0, itemzed .=0
// Returns: flat tax (13%) due after deductions
{
var deduction, taxableIncome, totaltax;
deduction= 4150
taxableIncome = income - deduction;
totaltax = 0.13*taxableIncome
alert(\'Total tax is \' + totaltax);
}
}
</script>
</head>
<body>
<div style=\"text-align:center\">
<h2>taxes</h2>
<p>
click to compute
</p>
<input type=\"button\" value=\"income 100000.00\" onclick=\"itemized (12017.50);\">
<input type=\"button\" value=\"income 42500.00\" onclick=\"itemized(8900.99);\">
<input type=\"button\" value=\"income 13267.45\" onclick=\"itemized(14000.00);\">

<input type=\"\" name=\"\">>
<hr>
<div id=\"outputDiv\"></div>
</div>
</body>
</html>

trying to get this html to calculate tax values, useing a js library file, <script type=\
trying to get this html to calculate tax values, useing a js library file, <script type=\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site