Home > Article > Web Front-end > Please tell me how to achieve this requirement? _html/css_WEB-ITnose
Click the button on the html web page and a window will pop up. There are drop-down boxes and edit boxes in the window. There is a confirm and cancel button. Click OK to reopen a web page. How to achieve this?
window.open
div
can be achieved
The moderator is right!
window.open
div
can be achieved.
window.open opens a web page. I want to open something similar to a window.
div simulates a child window?
div simulates a child window?
Can it be made like a window? The pop-up
div simulates a child window?
Can it be made like a window? The pop-up
window.open
or IE’s modal window
but most of the current popular ones are div simulations. The main reason is that it does not open a new window and is more friendly.
You can choose to use modal form
Use
var returnValue=window.showModalDialog(url,"value","style");
to make a pop-up window, based on Return the value for subsequent operations
Pop up a div and put the drop-down button in it. Click the button window.open to try
Use
var returnValue=window.showModalDialog(url,"value ", "Style");
Create a pop-up window and perform subsequent operations based on the return value
1
Or use window.open, both are good choices
Use window.open By controlling layers with divs, pop-up forms can be realized! !
You can write a div that contains the input components you want, such as drop-down boxes, edit boxes and buttons. Set the position and index attributes of this div. This div is hidden at the beginning. Click After the button, set the display attribute of this div to block, add an onclick event to the OK button in the div, window.location.href="URL of the webpage to be reopened"
Check the use of Modal, There are ready-made ones in bootstrap that can be used
There are ready-made ones in easyui