您的位置:首页 > 其它

解决关闭showModalDialog窗口弹出画面问题

2007-08-03 11:41 375 查看
弹出窗口后,为了不让队父窗口进行操作,使用了window.showModalDialog()的方法,可是在关闭showModalDialog窗口的时候,总是会弹出一个新窗口。开始一直认为这个IE的bug,后来才发现自己在页面上少写<base target="_self">。索性把target属性查个到底:
Syntax


HTML<ELEMENT TARGET = sTarget... >
Scriptingobject.target [ = sTarget ]

Possible Values


sTargetString that specifies or receives one of the following values.
nameThe name of the target window or frame.
_blankLoad the linked document into a new blank window. This window is not named.
_media

Load the linked document into the HTML content area of the Media Bar. Available in Internet Explorer 6 or later.
_parentLoad the linked document into the immediate parent of the document the link is in.
_searchLoad the linked document into the browser search pane. Available in Internet Explorer 5 or later.
_selfDefault. Load the linked document into the window in which the link was clicked (the active window).
_topLoad the linked document into the topmost window.
The property is read/write. The property has a default value of _self.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.


Remarks


If there is no existing window or frame with the same name as specified in the target, a new window is opened with a name equal to the value of the target.
The window name is an optional argument in the open scripting method.

The property is read/write. The property has a default value of _self. 这句话说明默认的时候_self,为什么一定要加上后才有用呢?以后有时间再去研究吧。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐