火星的你 2015-10-25
听说jquery ui中dialog和easy ui中的dialog很像,因为没有用过easy ui,但在工作中有用到jquery ui中dialog,于是从官网上将例子看了下,并记录如下。
实例一
这是一个很简单的应用,打开一个对话框。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="jquery-ui.css">
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<link rel="stylesheet" href="style.css">
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
</head>
<body>
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</body>
</html> 代码$( "#dialog" ).dialog();加载页面的时候弹出一个对话框。效果如下: jquery easyui dialog可以两种方式使用1)定义div,使用iframe<div id="openRoleDiv" class="easyui-window" closed="true