您的位置:首页 > Web前端 > JQuery

jquery-easyui中创建Dialog

2010-03-08 16:23 513 查看
jquery-easyui中的Dialog是在Window的基础上生成的,可以包括顶部的工具栏和底部的按钮区,这是Dialog的标准布局。

比如,下面的这个对话框:



创建这个对话框是很简单的,看下面的代码:

<div id="dd" style="padding:5px;width:400px;height:200px;">
Dialog Content.
</div>


$('#dd').dialog({
title:'My Dialog',
iconCls:'icon-ok',
toolbar:[{
text:'Add',
iconCls:'icon-add',
handler:function(){
alert('add')
}
},'-',{
text:'Save',
iconCls:'icon-save',
handler:function(){
alert('save')
}
}],
buttons:[{
text:'Ok',
iconCls:'icon-ok',
handler:function(){
alert('ok');
}
},{
text:'Cancel',
handler:function(){
$('#dd').dialog('close');
}
}]
});


原文及下载地址:http://jquery-easyui.wikidot.com/tutorial:dlg1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: