1、页面引入jquery基本库、jquery-ui库、jquery-ui的css文件
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/jquery-ui-1.9.0.custom.js"></script>
<link rel="stylesheet" type="text/css" href="<%=path %>/css/jquery-ui.css" />
2、在页面的尾部(body的结束标签之前)建立一个div,在其他位置是否可以没有尝试,也不关心。div中的内容任意,可以是任意的form元素也可以
是iframe。
<div id="organization-div">
<iframe id="organizationIframe" src="" width="100%" frameborder="0" scrolling="auto" height="100%"/>
</div>
3、声明页面加载时初始化这个窗口。
$("#organization-div").dialog({
autoOpen: false,
height: 430,
width: 800,
modal: true,
buttons: {
" 保 存 ": submitFtn,
" 取 消 ": function() {
$( this ).dialog( "close" );
}
} });