js Math

...

// Math 对象用于执行数学任务。
// http://www.w3school.com.cn/jsref/jsref_obj_math.asp
document.write("注释:Math 对象并不像 Date 和 String 那样是对象的类,因此没有构造函数 Math(),像 Math.sin() 这样的函数只是函数,不是某个对象的方法。您无需创建它,通过把 Math 作为对象使用就可以调用其所有属性和方法。");
/*
    属性和方法的语法:
    var pi_value=Math.PI;
    var sqrt_value=Math.sqrt(15);
*/

 

posted @ 2019-01-16 15:44  SilentKiller  阅读(104)  评论(0)    收藏  举报