Home > Web Front-end > JS Tutorial > Solution to the return value problem of modal dialog box showModalDialog in Chrome_javascript skills

Solution to the return value problem of modal dialog box showModalDialog in Chrome_javascript skills

WBOY
Release: 2016-05-16 18:26:37
Original
1557 people have browsed it

I haven't found a good solution. The temporary solution is to assign the return value to window.opener.ReturnValue in the pop-up window at the same time. In this way, after closing the window, the return value is obtained through the following code:

Copy code The code is as follows:

var val = window.showModalDialog(...);
if(!val)
val= window.ReturnValue;

This way in IE, FF, and Chrome, You can get the return value.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template