<script language="javascript"> function checkForm(){ var Sum="0.11"; var Sum2 = "0.2801"; var Sum3="1.002"; var amount = parseFloat(Sum+Sum2 ); 相加本来为1.3921,但sum1得出的结果为:1.3921000000000001,显然不正确,通过toFixed(n)方法修…
js中settimeout方法加参数的使用. 简单使用看w3school 里面没有参数调用, 例子: <script type="text/javascript"> function timedMsg() { var a ="dd"; var t=setTimeout(function(){ cao(a);},3000) } function cao(a) { alert(a); } www.jbxue.com </scrip…