使用dialog

这篇博客介绍了如何使用jQuery UI库创建对话框。通过引入相应的CSS和JS文件,然后初始化`$("#complainDialog")`来实现一个名为`complainDialog`的对话框元素。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

头部

<link rel="stylesheet" type="text/css"
href="${ctx}/css/classics/jqueryui/smoothness/jquery-ui.min.css" />
<script src="${ctx}/js/mr/jquery-1.9.1.min.js"></script>
<script src="${ctx}/js/jqueryUI/jquery-ui-1.10.3.custom.min.js"></script>




javascript


complainDialog =  $("#complainDialog");

  complainDialog.load("${ctx}/complain/listBeautyOrg");
  complainDialog.dialog({
  title : '选择机构',
iconCls : "icon-edit",
collapsible : false,
minimizable : false,
maximizable : false,
resizable : true,
width : 500,
height : 200,
modal : false,
   buttons: {
       "确定": function() {
        var orgId = $("#selectOrgId").val();
        console.log(orgId);
    var category=2;//投诉
    if(orgId==""){
    alert("请选择医院");
    }else{
    complainDialog.dialog("close");
         window.open("${ctx}/complain/toAddComplain?orgId="+orgId+"&category="+category+"&flag=1");//投诉
    }
        
       },
       "取消": function() {
        complainDialog.dialog("close");
       }
    }
  });

 

jsp

<div id="complainDialog"></div><!-- 投诉 -->

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值