网页设计与Web编程chapter07总汇.pptVIP

  • 5
  • 0
  • 约2.94万字
  • 约 87页
  • 2017-03-26 发布于湖北
  • 举报
内部对象 Math对象 Math对象用于完成比简单算术运算更高级的数学处理。Math对象不需要通过new运算符和构造函数创建,用户可以通过以下方式直接访问它的属性和方法: Math.属性名 Math.方法名(实参列表) 例如:log=Math.LN10; root=Math.SQRT2; alert(Math.floor(log)); alert(Math.ceil(log)); alert(Math.round(root)); alert(Math.max(log, root)); alert(Math.floor(Math.random( )*6)+1); 复合数据类型 内部对象 Date对象 Date对象提供了处理日期和时间的强大功能,创建Date对象的一般格式为: var 对象名 = new Date ([实参列表]); 例如:var d1=new Date( ); var d2=new Date(2008, 7, 8, 20

文档评论(0)

1亿VIP精品文档

相关文档