HI, i以前我曾经使用windows.showmodaldialog打开弹出页面,当我点击提交它时,在paents页面上显示的值显示没有任何回发 但现在我正在使用window.open,但它需要一个回发将该数据绑定到父页面
HI , i Have problme regarding popup in chrome previously i used to use windows.showmodaldialog which open the popup page and when i click submit it value show on the paents page without any postback but now i m using window.open but it requires one postback to bind that data to parent page
推荐答案请点击这里 窗口。 showModalDialog() - Web API | MDN [ ^ ] 想一想。 Please check here Window.showModalDialog() - Web APIs | MDN[^] Think about it. Quote:
已弃用 此功能已从Web标准中删除。虽然有些浏览器可能仍然支持它,但它正在被删除。不要在旧项目或新项目中使用它。使用它的页面或网络应用程序可能随时中断。
Deprecated This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
并通过以下链接 javascript - 为什么不推荐使用window.showModalDialog?用什么代替? - 堆栈溢出 [ ^ ]
这不是你写的 Window.showModalDialog()。 JavaScript区分大小写,因此您编写的是错误的函数名称;此功能已被弃用: Window.showModalDialog() - Web API | MDN [ ^ ]。 当然你可以使用 window.open 。我不知道它如何与回发有关。这些函数是JavaScript函数,根本与服务器端活动无关。 但是,从这个意义上讲,使用弹出窗口是一个坏主意。它不仅不够方便,而且经常在客户端被阻止。浏览器阻止弹出窗口的插件很受欢迎,主要是因为烦人的广告大大污染了网页。 在我的文章从零开始的模拟弹出窗口 [ ^ ]我讨论了一些更好的选择。
更多推荐
Chrome中的POPup问题
发布评论