Yii-自定义删除确认弹框(zyd)jquery实现代码
人气:0
1.链接
<?php echo CHtml::link(Yii::t('cmp','Delete'),'javascript:',array('class'=>'c_06c','onclick'=>'return art_del_confirm("/company/msgloghttps://img.qb5200.com/download-x/delete/id/'.$data->zml_id.'","你确定要删除这条消息吗?")'))?>
2.jq
<script>
//单项删除确认框
function art_del_confirm(url,message){
message = message?message:'你确定要删除这条数据吗?';
art.dialog({
title: '确认删除',
okValue:'确认',
cancelValue:'取消',
width: 230,
height: 100,
fixed: true,
content: message,
ok: function () {
window.location.href=url;
return true;
},
cancel: function () {
return true;
},
});
}
</script>
效果图
复制代码 代码如下:
<?php echo CHtml::link(Yii::t('cmp','Delete'),'javascript:',array('class'=>'c_06c','onclick'=>'return art_del_confirm("/company/msgloghttps://img.qb5200.com/download-x/delete/id/'.$data->zml_id.'","你确定要删除这条消息吗?")'))?>
2.jq
复制代码 代码如下:
<script>
//单项删除确认框
function art_del_confirm(url,message){
message = message?message:'你确定要删除这条数据吗?';
art.dialog({
title: '确认删除',
okValue:'确认',
cancelValue:'取消',
width: 230,
height: 100,
fixed: true,
content: message,
ok: function () {
window.location.href=url;
return true;
},
cancel: function () {
return true;
},
});
}
</script>
效果图
加载全部内容