An important point about the open() method is that it is almost always invoked as window.open(), even though window refers to the global object and should therefore be entirely optional. Since the document object also has an open() method, specifying the window object when we want to open a new window is essential for clarity. In event handlers, you must specify window.open() instead of simply using open(). Due to the scoping of static objects in JavaScript, a call to open() without specifying an object name is equivalent to document.open(). When the event handler of an HTML button executes, for example, the scope chain includes the Button object, the Form object, the Document object, and finally, the Window object that contains the document. Thus, if such an event handler refers to the open() method, this identifier ends up being resolved in the Document object, and the event handler opens a new document instead of opening a new window.
document.open 一般为document.write或document.writeln写入流做准备的
document.close强制显示输入流。
- [游客] 好东西,收藏之 05/26 23:40
- [游客] 有机会也搞搞 07/23 11:06
- [游客] 看不懂咧。 12/10 20:33
- [游客] 范式?好像是数据库原理吧。 12/10 20:30
- [游客] 顶! 12/07 15:14
- [游客] 分析的很正确啊。 12/07 15:11
- [gyk1983] 加油 12/06 16:37
- [wdm] 是这么回事。以前我也遇见过,不过,重新启动就没事了。 应该是再重启后这个键值就应高over了吧。 03/22 14:15
- [wdm] 蛤蟆跳井--扑通(不懂) 03/21 14:31
- [xiaofkg] 通用的 03/21 08:41
- [huibian] 建议增加些注释 ;-) 01/04 10:38
- [xiaofkg] 继续,成功就在脚下。 01/03 19:14
- [xiaofkg] 坚持做好所能做好的一切,加油,加油.... 10/19 16:56