为什么我的JAVASCRIPT脚
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script language="javascript"> function com() { var money=parseInt( lue); var level=parseInt( lue); lue=(money-level)*0。 3; } function initial() { lue=""...全部
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <script language="javascript"> function com() { var money=parseInt( lue); var level=parseInt( lue); lue=(money-level)*0。
3; } function initial() { lue=""; lue=""; lue="";//这个地方您是在中文状态下输入的分好,应该该为英文状态下输入} </script> </head> <body> <form name="myform" method="post"> <table border="1"> <tr><td colspan="2">个人所得税计算器</td></tr> <tr><td>请输入你的月收入</td><td><input type='text' name='money' /></td></tr> <tr><td>请输入所得税起征额</td><td><input name="level" type='text' /></td></tr> <tr><td>所得税</td><td><input name="result" type='text' /></td></tr> <tr><td><input type="button" value="计算" onClick="com()"/></td> <td><input type="button" value='重填' onClick="initial()" /></td></tr> </table> </form> </body> </html> 为什么不用 getElementById("");来获取值?。
收起