자바 스크립트는 다음과 같은 지침을 따라야합니다 : 소득이 $ 70,000 세율이 70 %에서 (% 기호를 시작 이상하지 않습니다 경우초보자
- 을 쇼)
- 소득이
- 그렇지 않으면 세율이 25 %에서 시작 $ 20,000 세율은 10 %에서 시작 이하 (% 기호가 표시되지 않습니다) 인 경우
나는 내 기능이 작동하지 않습니다
도움이 될 것이다이 질문을 통해 얻을 수 있도록 할 것 천 실수 아무것도하지만 거기에 알고 난조차 궤도에 확신 메신저입니다
<html>
<head>
<script language = "JavaScript">
function()
{
var IncomeInput,
TaxRateCalc;
IncomeInput = parseInt(document.TaxInfo.Income.value);
if (IncomeInput>=70000)
{
TaxRateCalc = "70";
}
else if (IncomeInput=<20000)
{
TaxRateCalc = "10";
}
else()
{
TaxRateCalc = "25";
}
document.TaxInfo.TaxRate.value = TaxRateCalc;
}
</script>
</head>
<body>
<center>
The Taxman
</center>
<form name = "TaxInfo">
<table border = "3">
Your Tax Information<br>
<tr><td>Income</td> <td> <input name = "Income" value = "10000000" size = "20"> </td> </tr>
<tr><td>RRSP</td> <td> <input name = "RRSP" value ="0" size = "20"></td> </tr>
<tr><td>Tax Rate</td> <td> <input name = "TaxRate" value = "" size = "20"> </td> </tr>
<tr><td>Taxes Paid</td> <td> <input name = "TaxesPaid" value = "0" size = "20"> </td> </tr>
<tr><td>Refund or Due</td> <td> <input name = "RefundOrDue" value = "0"size = "20"> </td> </tr>
</table>
</form>
<form name = "Extra Deductions">
Extra Deductions-
Children <input name = "Children" type = "radio">
Spouse <input name = "Spouse" type = "radio">
Both <input name = "Both" type = "radio">
None <input name = "None" checked type = "radio">
</form>
<form name = OldPeople >
Over age 65? <input name = "Over age 65?" type = "checkbox" >
</form>
<form name = "Selection">
Special Cases
<select name="SpecialCases">
<option value ="None"> None </option>
<option value ="Hardship Claimed"> Hardship Claimed </option>
<option value ="Mercy"> Mercy </option>
<option value ="Lawyer"> Lawyer </option>
</select>
</form>
<form name = "buttons">
<input type = "button" value = "Calculate your tax" onclick = "">
<input type = "button" value = "Clear Display Area" onclick= "aloop">
</form>
<form name = "YourTaxRate">
Your Tax Rate<br> <textarea name = "TaxRate" rows = "15" cols = "25"> </textarea>
</form>
</body>
</html>
숙제를, 맞죠? – JuanSedano
** ** ** 모든 기사 ** [여기] (http://www.w3schools.com/js/default.asp)를 먼저 읽으시 길 바랍니다. 단지 몇 시간 밖에 걸리지 않습니다. – skobaljic
예. 불행히도 –