【JavaScript权威指南大纲】:window
window
- 基本属性:name,document,screen,navigator,location,history,;
- 引用window对象的属性:window,self,frames,top,parent,opener
- 位置和尺寸:innerWidth,innerHeight,outerWidth,outerHeight,screenX,screenY,pageXOffset,pageYOffset,scrollTo(x,y),scroll(x,y),scrollBy(sx,sy)
- 创建窗口:newWindow=window.open(url,name,feature,replace);newwinodw.close();
- 计时器:num=setTimeout(func,timeout,args),clearTimeout(num),num=setInterval(func,interval,args),clearInterval(num);
- 对话窗:alert(str),confirm(str),prompt(str),showModalDialog(url,args)
screen
- width,height:显示屏
- availWidth,availHieght:出去固定内容
- colorDepth,pixelDepth:色彩深度的位
navigator
- appName:浏览器名称netscape
- appVersion:版本和平台信息
- platform:操作系统
- userAgent
- geolocation
- onLine
location
- 属性
-
- href:url
- protocol:http:
- hostname:www.baidu.com
- host:www.xxx.com:80
- port :80
- pathname:/cata/search.html
- search:?q=javascript
- hash:#result
- 方法
-
- reload()
- assigm(url)
- replace(url)
history
- length:历史记录条目数
- back()
- forward()
- go(num)

浙公网安备 33010602011771号