TypeError: window.showModalDialog is not a function 错误表明你尝试调用的 window.showModalDialog 方法在当前的浏览器环境中不存在或不可用。这通常是因为该方法已被废弃或不被当前浏览器支持。 2. window.showModalDialog 方法已被废弃的情况 window.showModalDialog 是一个较老的JavaScript方法,用于显示一个模态对话框...
为什么会出现window.showModalDialog is not a function 函数没写错,原来在chorme 37以后,谷歌就已经把这个函数停用了,把停用的showModalDialog改成window.open就可以打开子窗体了,360极速模式下也停用了这个。 同样的在子窗口操作源窗口的dialogArguments方法也不能用了。这个改为window.opener就可以了。记住不要拼写错误。
按F12打开调试器发现window.showModalDialog()这个函数没有定义。 解决方法: 1 2 3 4 5 6 7 8 9 10 11 $(function(){ if(window.showModalDialog == undefined){ //alert("初始化的时候,判断window.showModalDialog是否存在") window.showModalDialog = function(url,mixedVar,features){ window.hasOpenWindow ...
//新版本谷歌没有window.showModalDialog,创建一个window.open if(window.showModalDialog == undefined){ window.showModalDialog = function(url,mixedVar,features){ window.hasOpenWindow = true; if(mixedVar) var mixedVar = mixedVar; if(features) var features = features.replace(/(dialog)|(px)/ig,"")...
为什么会出现window.showModalDialog is not a function 函数没写错,原来在chorme 37以后,谷歌就已经把这个函数停用了,把停用的showModalDialog改成window.open就可以打开子窗体了,360极速模式下也停用了这个。 同样的在子窗口操作源窗口的dialogArguments方法也不能用了。这个改为window.opener就可以了。记住不要拼写错误。
window.showModalDialog(url,arguemnts,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;"); } else { window.open(url,"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1"); ...
function reloadPageWithHash() { var initialPage = window.location.pathname; window.location.replace('http:///#' + initialPage); } Note:The example above works in situations wherewindow.location.hashdoes not need to be retained. However, in Gecko-based browsers, settingwindow.location.pathnamein...
window.alertDialog boxes are modal windows - they prevent the user from accessing the rest of the program's interface until the dialog box is closed. For this reason, you should not overuse any function that creates a dialog box (or modal window). And regardless, there are very good ...
A typical modal window is created by the alert() function. The exact behavior of modal windows depends on the platform and on the Mozilla release version. Note: As of Gecko 1.9, the Internet Explorer equivalent to this feature is the window.showModalDialog() method. For compatibility reasons...