---
title: "从头开始学JavaScript（第三天）"
author: "magnesium"
date: "2009-01-16T23:35:25Z"
tags: []
slug: "javascript"
draft: false
lastmod: "2009-01-16T23:35:25Z"
id: 317683
url: "https://magnesium.iteye.com/blog/317683"
---

今天是学习《head first JavaScript》的第三天

1.setTimeout(time code , time delay)  定时

2.setInteral("" ,time)                循环

3.location.reload()                刷新页面

4.clearInterval(setInterval())     取消循环

5.document.body.clientHeight
   
  document.body.clientWidth

6.document对象代表的是整个网页，也就是body标签中的内容

7.document.getElementById().style.height 不是必须再设定width，会自动调整的

8.<body onresize="">

9.javascript生命周期3阶段

10.种cookie: document.cookie=""+expires+"="+

11.date.toGMTString()

=============================156=============================