ucUncaught TypeError: window.showModalDialog is not a function关于showModalDialog停用的问题
2017-10-26 19:01
585 查看
ucUncaught TypeError: window.showModalDialog is not a function关于showModalDialog停用的问题
function openWin(f, n, w, h, s){
//测试值得传入
alert("测试"+f+" "+n+" "+w+" "+h+" "+s);
// var result=window.showModalDialog(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
var result=window.open(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
if(result==true)
{
window.location.reload(true);
}
else
{
//window.location.reload(true);
}
}在前台中
var result=window.showModalDialog(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
后台的值也传进来了,为什么会出现window.showModalDialog is not a function
一个onclick一直无响应,后台的数据发现也传过去了,在前台出现这个window.showModalDialog is not a function,
不可能啊,怎么没发现呢,函数也没写错啊,结果查了查,原来在chorme 37以后,谷歌就已经把这个函数停用了,
把停用的showModalDialog改成window.open就可以打开子窗体了,应该说好多旧方法都在摒弃。。。
如果发发现js有不对的地方,打开浏览器多多按F10,进行js调试跟踪。
改成open就可以完美解决
function openWin(f, n, w, h, s)
{
//测试值得传入
alert("测试"+f+" "+n+" "+w+" "+h+" "+s);
// var result=window.showModalDialog(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
var result=window.open(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
if(result==true)
{
window.location.reload(true);
}
else
{
//window.location.reload(true);
}
}
相关文章推荐
- Uncaught TypeError: window.showModalDialog is not a function 谷歌
- Uncaught TypeError: window.showModalDialog is not a function chrome 谷歌浏览器
- Uncaught TypeError: window.showModalDialog is not a function 谷歌
- Uncaught TypeError: window.showModalDialog is not a function
- window.showModalDialog 在谷歌Uncaught TypeError: undefined is not a function
- 关于jquery使用live()方法的问题Uncaught TypeError: $(...).live is not a function
- 关于Uncaught TypeError: type is not a function at HTMLAnchorElement.onclick (indexjsp:71)的解决
- 关于 "Uncaught TypeError: Property 'submit' of object #<HTMLFormElement> is not a function" 的解决方案
- 报错:Uncaught TypeError: $(…).dialog is not a function,处理方法。
- TypeError: newRawData.forEach is not a function问题解决
- Uncaught TypeError: window.jsObj.closeWebView is not a function
- TypeError: window.open is not a function
- 关于JavaScript一个错误 Uncaught TypeError: form.submit is not a function
- 关于window.location.href is not a function在FF,chrom报错问题
- chrome浏览器Uncaught TypeError: object is not a function问题
- chrome浏览器Uncaught TypeError: object is not a function问题
- window.showmodaldialog is not a function
- TypeError: $(...).dialog is not a function debug过程
- chrome浏览器Uncaught TypeError: object is not a function问题解决
- [置顶] 解决vux 引入组件时Error in render function: "TypeError: _vm.$t is not a function"问题