您的位置:首页 > Web前端 > JavaScript

【JavaScript权威指南大纲】:window

2016-03-28 09:26 429 查看
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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: