Jquer dialog 弹出窗口实例

页面中加入

<link href="jquery.ui.theme.css" rel="stylesheet" type="text/css" OLDSRC="jquery.ui.theme.css" />

<script type="text/javascript" src="jquery-1.6.2.min.js" OLDSRC="jquery-1.6.2.min.js" ></script>
<script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js" OLDSRC="jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$("#dialog").dialog({
title: '内容',
autoOpen: false,
width: 600,
//height: 500,
resizable: false,
modal: true,
autoResize: true,
overlay: {
opacity: 0.5,
background: "black"
}
});
});
function openDialog(url){
var horizontalPadding = 30;
var verticalPadding = 30;
document.getElementById("addSit").src=url;
$("#dialog").dialog( "open" );

}

function closeDialog() {
$('#dialog').dialog('close');
// document.execCommand('Refresh');
}

</script>

加入链接

<a href="javascript:openDialog('<TRS_DOCUMENT field=_RECURL/>');"></a>

页面中添加

<div id="dialog" align="center" style="width:38px;height:400px">
<iframe id="addSit" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes" width="580" height="400"/>
</div>

你可能感兴趣的:(dialog)