最新回答 / 慕粉1243955
除不尽吗?可以给值res取小数点后2位,res.toFixed(2)document.getElementById('fruit').value=res.toFixed(2)
2019-03-18
最新回答 / 慕侠023444
document.write(Math.round(Math.random()*10))random得到的是0-1之间的小数,round将这个随机小数四舍五入,如果不将这个小数乘以10再进行四舍五入,得到的结果只会是0或者1.
2019-03-17
最新回答 / 慕斯卡3374434
for(var n =0;n<navLi.length;n++){
navLi[n].className="";
sectionLi[n].className="li";
}
请问这几行是什么意思 这里有点看不明白
2019-03-17
<script>
function dakai(){
window.open("http://yhmpz.ychspfbyy.com","","width=600px,heigth=400px");
}
</script>
function dakai(){
window.open("http://yhmpz.ychspfbyy.com","","width=600px,heigth=400px");
}
</script>
2019-03-17
最新回答 / 7QQ
这个是我的,你看看var time = 5;var hidden = setInterval(function(){ if(time == 0){ clearInterval( hidden); location.href = "https://www.baidu.com"; }else{ time--; document.getElementById('time')....
2019-03-17
最新回答 / 慕粉1243955
可以判断一下 if(a == '' || b == ''){ document.getElementById('fruit').value = '没有值'; }else{ document.getElementById('fruit').value = result.toFixed(2); }望采纳~
2019-03-16
已采纳回答 / qq_C_215
在new Date前的那个就不叫变量了,Date是一个类 ,var time = new Date ,此时的time是一个对象,对象能够调用类里面的方法和属性
2019-03-16
最新回答 / 笨鸟快快飞
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>数组</title><script type="text/javascript"> var arr=["*","##","***","&&","****","##"]; arr[7]="**";//创建数组 alert("数组arr的长度为:"+arr.length);//弹框输出数组长度...
2019-03-16