browers and html dom 官方解读
2014-03-22 13:30
411 查看
Window Object
The window object represents an open window in a browser.If a document contain frames (<frame> or <iframe> tags), the browser creates one window object for the HTML document, and one additional window object for each frame.
Note: There is no public standard that applies to the Window object, but all major browsers support it.
注解:窗口对象指的是一个在浏览器中打开的窗口。
TIPs : 如果一个html文档包含frames或iframe标签,则浏览器创建一个代表html文档的窗口对象,为每个frame创建一个额外的窗口对象
Window Object Properties
窗口对象的一些常用属性,不一一列举,可见w3school官网:window domdocument Returns the Document object for the window (See
Document object)
窗口对象的文档对象
frames
Returns an array of all the frames (including iframes) in the current
window
返回当前窗口的所有frames框架,是一个数据所装,可以用parant.window.frames['frame_name']获取
lenth Returns
the number of frames (including iframes) in a window
不解释
location
Returns the Location object for the window (See Location object)
parent
Returns the parent window of the current window
返回当前窗口的父窗口
Window Object Methods
常用方法alert(),confirm(),从close()什么的就不说了
重点说一下:
open() :
window.open(URL,name,specs,replace)
打开一个空白窗口
var
myWindow = window.open("","","width=200,height=100");
Open
a new window called "MsgWindow", and write some text into it:
var
myWindow = window.open("","MsgWindow","width=200,height=100");
myWindow.document.write("<p>T
c4a9
his is 'MsgWindow'. I am 200px wide and 100px tall!</p>");
再打开的窗口写入内容
相关文章推荐
- webpack其实没那么可怕——官方文档解读
- Spark官方文档《Spark Programming Guide》解读
- pushlet 之 官方示例解读与改造
- 浅谈Android官方MVP架构解读
- Struts2漏洞解读:官方惹祸 黑客攻防
- weex官方demo weex-hackernews代码解读(1)
- weex官方demo weex-hackernews代码解读(1)
- Android 5.x OTA Update官方文档(四、OTA更新包解读)
- 谷歌官方MVP Demo解读
- [Cocos2D-X官方文档:解读CCArray类]
- 官方解读双十一大促直播都看什么指标?
- openWRT自学---对官方的开发指导文档的解读和理解 记录3:一些常用方法
- Android开发之GridView的使用(解读谷歌官方API)
- 官方解读Activity之一
- 达尔文OP2官方demo解读(一)
- MVP架构-Android官方MVP项目和响应式MVP-RxJava项目架构分析对比解读
- [Cocos2D-X官方文档]:解读CCDictionary类
- 解读官方Android MediaPlayer API(1)
- CSS BoxModel 官方解读
- 工信部《VR产业白皮书》全文 14000字的官方解读