Implementation of easy Ui + Jquery pop-up window
There are many pop-up windows for easy Ui
I just want to make it easy to implement.
First, reference the easy ui JS
<script type="text/javascript" src="../js/jquery-1.8.2.min.js"></script><script type="text/javascript" src="../js/easyUI/jquery.easyui.min.js"></script>
Similarly, his style CSS files must be referenced.
The following is a DIV defined in the pop-up window.
Pop-up content
Note that the div style must be hidden.
Function openwindow (id, titlename, vwidth, vheight) {$ ('#' + id ). window ({width: vwidth, height: vheight, modal: true, title: titlename, collapsible: false, minimizable: false, // minimize maximizable: false, // maximize resizable: false });}
This is our JS pop-up method.
Id is the ID of your DIV
Titlename is shown at the top of your window, such as adding a user to modify a user.
Vwidth and vheight are the size of your pop-up window.
Let's start to see how to call it in JS.
First, we need to display the DIV style to block
Document. getElementById ("win"). style. display = "block"; openwindow ('win', 'modify Department ', 300,340 );
Closing the window is also very easy.
$('#win').window('close');
Well, there are a lot of attributes in the pop-up window. I won't explain them one by one. You can go to the easy ui official website to find them.