html5常用数学 公式的用法

<script>
        // alert(Math.PI);
        // alert(Math.floor(3.16));
    // var a=Math.ceil(3.1);
    // alert(a);
    // alert(Math.round(3.1));
    // alert(Math.round(3.5));
// var b=Math.random();
// document.write(b);

// for (var i = 0; i <10 ; i++) {
//     document.write(Math.floor(Math.random()*10+1)+"<br>");
// }
// function selec(low,high){
// var ch=high-low+1;
// return Math.floor(Math.random()*ch+low);
// }
// for (var i = 0; i < 10; i++) {
//     document.write(selec(1111,8888)+"<br>");
// }
// alert(Math.cos(Math.PI/3));
alert(Math.max(1,8,9,88));
</script>

天道酬勤,厚积薄发。 君子之行,静以修身,俭以养德。 非淡泊无以明志,非宁静无以致远。 如有恒,何须三更起,半夜眠;最怕莫,三天打鱼两天晒网,竹篮打水一场空。
原文地址:https://www.cnblogs.com/houweidong/p/9197133.html