js基础-单体对象日期对象

Math对象 全局对象

 

日期对象

var t = new Date()

t.toLocaleDateString();

t.getFullYear();

t.getMonth() + 1

t.getDate();

 

Math.ceil(2.34);  3

Math.floor(2.34)  2

Math.round(-3.45)  4舍5入

Math.random()  // 0 - 1之间的随机数 * 10  0 -10               * 100 0-100

 

全局对象

  window

  isNaN

  parseInt()

  encodeURI('http://老师')

  

  

 

posted @ 2018-05-08 16:45  suanmei  阅读(87)  评论(0编辑  收藏  举报