jquery 弹出框

一下为两个弹出框的样子,当然这个根据自己的需求设置样式
先引入下面js
<script type="text/javascript"src="http://image.tianji.com/js/jqueryUI.js">
</script>
此为jquery一个控件
<div id="showBoxId" style="display:none;border:1px solid #7EABCD;">
<div id="titleId" style="background:#BED5FF;padding:15px;font-weight:bold;TEXT-ALIGN: left;"><fmt:message key="label.group.core.membermange.rejectreason"/></div>
<textarea id="reasonId" style="width: 280px; height: 80px;overflow-x:hidden;overflow-y:hidden"></textarea>
<input type="button" id="refuseYes" value="<fmt:message key="button.group.core.membermange.submit"/>"/><input type="button" id="refuseNo" value="<fmt:message key="button.group.core.membermange.cancel"/>"/>
</div>

<div id="blacklistConfirmBox" style="display:none;border:1px solid #7EABCD;">
<div style="background:#BED5FF;padding:15px;font-weight:bold;TEXT-ALIGN: left;"><fmt:message key="message.group.core.membermange.blacklist.confirm"/></div>
<input type="button" id="blacklistConfirm" value="<fmt:message key="button.group.core.membermange.submit"/>"/><input type="button" id="blacklistCancel" value="<fmt:message key="button.group.core.membermange.cancel"/>"/>
</div>

两个对话框有了
就出发什么显示着两个对话框,并让背景置灰
<script>
$("#refuseYes").bind("click",function(){
$("#_eventId").val("ban");
if($("#reasonId").val()==""){
alert("<fmt:message key="error.group.core.membermanage.reason.required"/>");
}else{
$("#reason").val($("#reasonId").val());
$("#manageForm").submit();
[b]$.unblockUI(); [/b]
$("#reason").val("");
$("#reasonId").val("");
return false;
}

});
$("#refuseNo").bind("click",function() {
[b]$.unblockUI(); [/b]
$("#reasonId").val("");
return false;
});

$("#ban").click(function(){
if(checked()){
[b]$.blockUI({ overlayCSS:{backgroundColor: "#EFEFEF"}, message: $("#showBoxId")});[/b]
//$("#_eventId").val("ban");
//$("#manageForm").submit();
return false;
}

});



$("#blacklistConfirm").bind("click",function(){
$("#_eventId").val("blacklist");
$("#manageForm").submit();
[b]$.unblockUI(); [/b]
$("#reason").val("");
$("#reasonId").val("");
return false;

});
$("#blacklistCancel").bind("click",function() {
[b]$.unblockUI();[/b]
$("#reasonId").val("");
return false;
});

$("#blacklist").click(function(){
if(checked()){
[b]$.blockUI({ overlayCSS:{backgroundColor: "#EFEFEF"}, message: $("#blacklistConfirmBox")});[/b]
//$("#_eventId").val("blacklist");
//$("#manageForm").submit();
return false;
}
});

$("#selectAll").change( function() {
$(".memberIdBox").attr("checked", $(this).attr("checked")); //全选钮
});

$("#grantAdminship").click(function(){
if(checked()){
$("#_eventId").val("grantAdminship");
$("#manageForm").submit();
return false;
}
});
function checked(){
var isChecked = false;
$("input[@type=checkbox]",".memberMngTbale").each(
function(){
if($(this).attr("checked")){
isChecked=true;
return;
}
})
if(!isChecked){
alert("<fmt:message key="error.group.core.membermanage.memberids.required"/>");
}
return isChecked;
} //判断是否有选中的元素,如果没有的话,不允许提交

</script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值