简体   繁体   English

如何使用JavaScript在歌剧中显示模式弹出窗口

[英]how to show modal popup window in opera using javascript

i am able to show the madal popup window using javascript in IE using the following code: 我可以使用以下代码在IE中使用javascript显示madal弹出窗口:

var retVal = window.showModalDialog(PagePath, null, 'dialogWidth:850px;dialogHeight:870px;resizable:no;status:no;help:no;scroll=yes');

but its not working in Opera. 但它在Opera中不起作用。 Though I am able to open a window in Opera using window.open but i am not able to get the return value. 虽然我可以使用window.open在Opera中打开一个窗口,但是我无法获得返回值。

I am putting the return value in a hidden field and from code behind I am rediecting to the specified page based on the retun value (value in the hidden field). 我将返回值放在一个隐藏的字段中,并根据后面的代码根据重新调整值(隐藏字段中的值)重新定向到指定的页面。

AFAIK showModalDialog is an IE specific method. AFAIK showModalDialog是IE特定的方法。 If you want a modal box in other browsers, you'll have to program one yourself. 如果要在其他浏览器中使用模式框,则必须自己编程。 Maybe this jsfiddle can get you started. 也许这个jsfiddle可以帮助您入门。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM