Chrome中的POPup问题

编程入门 行业动态 更新时间:2024-10-27 01:26:35
本文介绍了Chrome中的POPup问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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函数,根本与服务器端活动无关。 但是,从这个意义上讲,使用弹出窗口是一个坏主意。它不仅不够方便,而且经常在客户端被阻止。浏览器阻止弹出窗口的插件很受欢迎,主要是因为烦人的广告大大污染了网页。 在我的文章从零开始的模拟弹出窗口 [ ^ ]我讨论了一些更好的选择。
-SA
It's not what you wrote Window.showModalDialog(). JavaScript is case-sensitive, so this what you wrote is wrong function name; besides this function has been deprecated: Window.showModalDialog() - Web APIs | MDN[^]. Of course you can use window.open. I have no idea how it can be related to postback. Those functions are JavaScript functions, not related to server side activity at all. However, using popup, in this sense of this word, is a bad idea. Not only it is inconvenient enough, but it is often blocked on the client side. The browsers' plug-ins blocking pop-ups are very popular, mostly because of annoying ads contaminating Web greatly. In my article Modal Popup From Scratch[^] I discuss some better alternatives.
—SA

更多推荐

Chrome中的POPup问题

本文发布于:2023-10-06 19:41:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1467628.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Chrome   POPup

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!