Two common ways to pop up a box in Js and return a value_javascript skills
WBOY
Release: 2016-05-16 18:12:57
Original
1403 people have browsed it
1.window.showModalDialog(url,args,dialogattrs) Parameter description: url: Pop-up page address agrs: Parameters passed from the main window to the dialog box, which can be of any type (Arrays are also available) dialogattrs: style parameters of pop-up windows Modal dialog usage: Main window: var value =window.showModalDialog('test.jsp',strs,'resizable:yes') ; Set the return value through window.returnValue in the pop-up box. The value above is the value obtained. Then the value can be processed in the main window to achieve interactive processing Note: Modal dialogue The application of the box lies in its return value, which can return simple characters or arrays. The modeless dialog box is similar to 2. window.open: [Parent window]
Summary: In general, windows.open is used because there are many customizations. There are many windows.open. Many of the above web page editors like to use showModalDialog. If you really don’t know which one to use, just use window.open. Many mature cms systems use window.open.
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