一般自己写
$('<div style="width:100px;height:100px;background:#ccc;position:fixed;margin-left:-50px;margin-top:-50px;top:50%;left:50%;">aaa</div>').appendTo(document.body)
$('<div style="width:100px;height:100px;background:#ccc;position:fixed;margin-left:-50px;margin-top:-50px;top:50%;left:50%;">aaa</div>').appendTo(document.body)
回二楼:easyui好像大材小用了吧。
前提是引入<script src="${ctx}/js/jquery-1.4.2.js"></script><!--jquery可以是高版本 -->
<script src="${ctx}/jquery-ui-1.8.22.custom/js/jquery-ui-1.8.22.custom.min.js"></script>
<link type="text/css" rel="stylesheet" href="${ctx}/jquery-ui-1.8.22.custom/css/ui-lightness/jquery-ui-1.8.22.custom.css" />
然后定义dialog的框大小和属性
比如
var dialogOptions={
height: 340,
width : 500,
modal : true,
title : '每日一览',
close : "",
buttons:{
"提交":function(){
alert("已保存")
$(this).dialog("close");
}};
当然了还有其他属性,网上可以自己查阅。
接下来在某个定义好的id上加载dialogOptions
$("#riskMsg").dialog(dialogOptions);
接着打开dialog
$("#riskMsg").dialog("open");
ok!
再推荐一个插件库网站 www.ui3g.com/