2015.7.15学习总结

7.15总结

Window 对象:

        

         Open (用于打开一个新的浏览器窗口或查找一个已命名的窗口。)

                   Window.open(URL,name,features,replace)

                            {URL == 新窗口中显示内容的地址

NAME == 用于声明新窗口的名字

              Features== 新窗口的特征   (“width 100px height 100px”)

                              Replace == 浏览历史中新建或替换条目 (包含true == 替换历史条目、

False == 新建历史条目)

         Moveto(x,y) 移动到指定坐标

                   相对于左上角的坐标点!

         Moveby(x,y)  移动到指定的像素         

                   X = 窗口右移的像素

                   Y = 窗口下移的像素

         ResizeBy = 按指定的像素来调整窗口的大小

                   Resizeby(width, height)

         Resizeto = 指定窗口的宽和高

                   Resizeto(width, height)

         setTimeout(code,millisec) 指定毫秒数后执行函数或计算表达式

                   code == 要调用的函数名

                   millisec == 毫秒数

                   !!该方法只执行一次,如需循环,可重复调用该函数

         clearTimeout() 清除延迟效果;

                   该值为setTimeout的返回ID值

         setInterval() 指定毫秒数后执行函数或计算表达式

                   该用法同setTimeout 相同,

                   !! 不同之处,此方法可自动循环

         clearInterval()清除延迟

                   !!同clearTimeout效果:

         History.go(-1) 参数是返回的页面数

                   正数为前进,负数为后退

         History.back() 后退

         History.forward()

                   前进

         History.length

                   返回历史页面的个数

Document 对象:

         Document(引用)

                   Document. getElementById() (引用ID)

         Write 可向文档写出HTML OR JAVAScript;

         Document.write();

         URL 返回当前文档的URL

                   Document.URL

         Title 返回当前文档的标题

                   Document.Title

         Referrer 返回载入当前文档的文档的 URL

                   Document.Referrer

         lastModify: 页面的最后修改日期

                   document.lastModify

         anchors 页面中的所有锚点

                   document.anchors

         images : 图片集合

                   document.images[1]

                   document.images[images name]

         links : 超级链接

                   document.links

Location对象:

         Host:URL中主机名称

                   Location.host

         Pathname: URL 中主机名后的部分

                   Location.pathname

         Prot : 端口

                   Location.prot

         Protocol 协议

                   Location.protocol

         Search:URL中问号后面的部分

                   Location.search

         跳转到页面

                   Location. Herf = "a.html"

                   Location.assign = ("a.html")

                   Location.replace( "a.html")  该方法没有历史信息

         刷新页面

                   Location.reload(boolean);

                            True:是从服务器刷新

                            False:是从本地刷新

Screen对象

         跟屏幕相关:

                   availlHeight:窗口的高度

                   availlWidth:窗口的宽度

                   colorDepth:颜色的位数

                   height: 屏幕的高度

                   屏幕的宽度

原文地址:https://www.cnblogs.com/lastorder/p/4649372.html