Home >Web Front-end >JS Tutorial >Google Chrome does not support the showModalDialog modal dialog box solution_javascript skills

Google Chrome does not support the showModalDialog modal dialog box solution_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:35:552099browse

Suddenly discovered that Chrome browser version 37.0.2062.103 m does not support the showModalDialog modal dialog box and cannot return returnValue

Nothing originally used in the project can be executed normally

I found a compromise solution using window.open instead of showModalDialog and using window.opener.document to operate the elements of the parent page

Copy code The code is as follows:

window.open("xsp/exesp?todo=13","","height=500,width=280,status=yes,toolbar=no,menubar=no,location=no");

Copy code The code is as follows:

window.close();
window.opener.document.getElementById("classid").value=treeid;
window.opener.document.getElementById("classname").value=treename;
Statement:
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