var self=$.LIGdialog();
self.model=false;//遮罩层是否显示 false:隐藏
self.content=$obj;//设置弹出框内容 为$obj
self.init_After=function(){};//初始化完成后事件
self.setTitle=function(val){};//设置标题
self.init=function(){};//初始化
self.show=function(){};//显示
self.hide=function(){};//隐藏
self.destory=function(){};//销毁
弹出框内容界面有两种编写方式
方式1:在jsp界面中通过标签库添加界面,再通过js控制页面
<LIG:dialog title="test" id="testdialogid" width="500" height="150">
<jsp:attribute name="content">
<h1>内容</h1>
<h1>内容</h1>
<h1>内容</h1>
<h1>内容</h1>
<h1>内容</h1>
</jsp:attribute>
<jsp:attribute name="button">
<LIG:dialogbutton id="button1" text="按钮1"></LIG:dialogbutton>
<LIG:dialogbutton id="button2" background="red" text="按钮2"></LIG:dialogbutton>
<LIG:dialogbutton id="button3" background="green" text="按钮3"></LIG:dialogbutton>
</jsp:attribute>
</LIG:dialog>
<LIG:dialog title="无按钮弹出框" id="testdialogid2" width="400" height="150">
<jsp:attribute name="content">
<h1>内容123</h1>
<h1>内容123</h1>
<h1>内容123</h1>
</jsp:attribute>
</LIG:dialog>
方式2:在js也编写
//$obj可为jsp中LIG:dialog对象 如:$obj=$("#testdialogid2");
//也可以在js中编写 如:var str=\\\'\\\'; $obj=$(str);
var str=\\\'<div id="Confrm_\\\'+new Date().getTime()+\\\'" style="left: 0px; top: 0px; width: 1px; height: 1px; position: fixed; display: none;">\\\'+
\\\' <div class="dialog_model" style="display:block;background:#ccc"></div>\\\'+
\\\' <div class="dialog" style="width: \\\'+_width+\\\'px; height: \\\'+(_height+69)+\\\'px; position: absolute;">\\\'+
\\\' <div id="header" class="dialog-header">\\\'+
\\\' <h2>系统提示</h2>\\\'+
\\\' <a id="close_button_ico"></a>\\\'+
\\\' </div>\\\'+
\\\' <div class="dialog-body" style="width: \\\'+(_width)+\\\'px; height: \\\'+(_height+36)+\\\'px;">\\\'+
\\\' <div style="width:\\\'+_width+\\\'px; height: \\\'+_height+\\\'px;overflow: hidden;display:table;text-align:center">\\\'+
\\\' <span style="display: table-cell; vertical-align: middle;">\\\'+msg+\\\'</span>\\\'+
\\\' </div>\\\'+
\\\' <table class="windowcontrol">\\\'+
\\\' <tbody>\\\'+
\\\' <tr>\\\'+
\\\' <td align="center">\\\'+
\\\' <input class="dialog_button" id="yes_button" value="确定" style="background:#0E60AC" type="submit"/>\\\' +
\\\' <input class="dialog_button" id="cancel_button" value="取消" style="background:#CCC" type="submit"/>\\\'+
\\\' </td>\\\'+
\\\' </tr>\\\'+
\\\' </tbody>\\\'+
\\\' </table>\\\'+
\\\' </div>\\\'+
\\\' </div>\\\'+
\\\'</div>\\\';
var self=$.LIGdialog();
self.content=$obj;
self.model=true;
self.init_After=function(){
self.content.find("#button1").bind("click",function(){
alert("确定按钮");
});
self.content.find("#button2").bind("click",function(){
alert("关闭按钮");
});
};