开发者社区 问答 正文

JS报错 Uncaught TypeError: undefined is not a function,要怎么处理

在google浏览器中使用

window.showModalDialog(url,"Arguments","dialogHeight: 550px; dialogWidth: 900px; dialogTop: 10px; dialogLeft: 10px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;"); 弹窗
会出现 Uncaught TypeError: undefined is not a function的报错,其他浏览器好像不会

展开
收起
爵霸 2016-06-06 11:28:49 5458 分享 版权
1 条回答
写回答
取消 提交回答
  • showModalDialog 不是标准的BOM方法,可以使用window.open代替

    2019-07-17 19:28:01
    赞同 展开评论