各位大哥,小弟还有一些问题~~~以下这段代码: <html> <head> <title>HAHA</title> <script languege="JavaScript"> function lala() { while(true) { n=form1.KK.value if(n-Math.floor(n)!=0) { alert("请输入整数!!!") break } for($100=0;n>=100;n=n-100,$100++){} for($50=0;n>=50;n=n-50,$50++){} for($20=0;n>=20;n=n-20,$20++){} for($10=0;n>=10;n=n-10,$10++){} for($5=0;n>=5;n=n-5,$5++){} for($2=0;n>=2;n=n-2,$2++){} for($1=0;n>=1;n=n-1,$1++){}
document.write("100元纸币",$100,"张<p>") document.write("50元纸币",$50,"张<p>") document.write("20元纸币",$20,"张<p>") document.write("10元纸币",$10,"张<p>") document.write("5元纸币",$5,"张<p>") document.write("2元纸币",$2,"张<p>") document.write("1元纸币",$1,"张")
break } document.write("<script languege='JavaScript'>function haha(){window.history(1)}</script>", "<form name='form1'><input type='button' value='我还要算!' onclick='haha()'></form>") } </script> </head> <body> <h1><p align="center">数钱啦~~~来,告诉我你要找赎多少钱?<p></h1> <form name="form1"> <input type="text" name="KK" value="0"> <input type="button" value="开始数钱!!!" onclick="lala()"> </form> </body> </html> 小弟自己检查了几遍,觉得理论上已经可行,可是运行起来老是有问题,各位大哥帮忙看看到底是什么回事?