自学一个星期小白,已经无从下手,求大神帮改
程序代码:
<html> <head> <style type="text/css"> td {text-align:center;background-color:#C0C0C0;} input {text-align:center} .biaoge { width:1800px;height:1000px;padding-top:60px;padding-left:130px;background-color:#989898;} input:focus{background-color:#FFFFCC;} </style> <script type="text/javascript"> function IntValueCheck(input) { var value = input.value; var result = true; for (var i = 0; i< value.length; i++) { var vcar = value[i]; if ((vcar == "0")||(vcar == "1")||(vcar == "2")||(vcar == "3")|| (vcar == "4")||(vcar == "5")||(vcar == "6")||(vcar == "7") ||(vcar == "8")||(vcar == "9")||(vcar == ".")) { } else { alert("只允许输入整数字"); } } } </script> </head> <body > <div class="biaoge"> <table border="1" cellspacing="8" > <tr> <td><input id="number1" type="text" onblur="IntValueCheck(this);" /></td> <td><input id="number2" type="text" size="10px" onblur="IntValueCheck(this);"/></td> <td><input id="number3" type="text" readonly size="10px" /></td> </tr> </table> </div> </body> </html>直接主题,我要number1×number2=number3 number1只可以整数,number2可以整数小数点,其他都报错,而且input填充颜色,number3无法选取,只输出数值,求打救,在线等,