|
发表于 2017-3-15 11:47:43
|
显示全部楼层
web页面的script执行window.close();时,web.form不关闭,ie默认返回提示“您查看的网页正在试图关闭窗口。是否关闭此窗口”
- var wb = web.form(winform
- ,0x40000/*_UIFLAG_THEME*/
- ,0x10/*_DLCTL_DLIMAGES*/ | 0x40000000/*_DLCTL_SILENT*/
- );
- //wb.noScriptErr = true; //不提示脚本的异常,此项可屏蔽提示
- //方法一
- wb.BeforeNavigate2 = function( pDisp, url, flags, targetFrame, postData, headers, cancel ) {
- if(flags=0) winform.close()
- return url, Flags, TargetFrameName, PostData, Headers,Cancel;
- }
- //方法二
- wb.WindowClosing = function( IsChildWindow, Cancel ) {
- winform.close()
- }
复制代码 |
|