打赏

来谈一谈------JavaScript对象

 

1.window常用的属性:

   ①history

   ②location

 

2.history对象的方法:

  ①back()

  ②forward()

  ③go()

 

3.location对象的属性:

  ①host()

  ②hostname()

  ③href()

 

4.location对象的方法:

  ①reload()

  ②replace()

  

 

5.window对象常用的方法:

   ①prompt()

   ②alert()

   ③confirm()

   ④close()

   ⑤open()

   ⑥setTimeout()

   ⑦setInterval()

 

6.window对象常用的事件:

  ①onload()

  ②onmouseover()

  ③onclick()

  ④onkeydown()

  ⑤onchange()

 

7.document对象的常用属性:

  ①referrer

  ②URL

 

8.document对象的常用方法:

  ①getElementById()(用于访问唯一的元素)

  ②getElementsByName()(用于访问相同name属性的一组元素)

  ③getElementsByTagName()(用于访问相同标签的一组元素)

  ④write()

 

9.Math的常用方法:

  ①ceil()

  ②floor()

  ③round()

  ④random()

 

10.Date对象的常用方法:

  ①getDate()

  ②getDay()

  ③getHours()

  ④getMinutes()

  ⑤getSeconds()

  ⑥getMonth()

  ⑦getFullYear()

  ⑧getTime()

 

11.JavaScript中提供了两个定时函数:  setTimeout() 和 setInterval()

                     两个清除函数:  clearTimeout()和 clearInterval()

 

posted @ 2017-02-25 11:55  ♀流氓  阅读(239)  评论(0编辑  收藏  举报
返回頂部