artDialog的几种基本使用
1、confirm形式
var dialog=art.dialog({
lock:true,
content: '请确认,您是否要删除选中的用吗?',
icon: 'question',
ok: function () {
window.location.href="..";选择ok,跳转的action
},
cancelVal: '关闭',
cancel: true //为true等价于function(){}
});
2、打开弹出层表单页面
function addLan(id){
var url ="";
art.dialog.open(url,{ //url 跳转弹出层连接
title:"新增常用语",
width:400,
height:250,
lock:true,
window: 'top',
close:function(){
}
});
}
3、弹出层表单页面提交
var win = art.dialog.open.origin;//来源页面
$("#fm").ajaxSubmit({
type:'POST',
success:function(data){
if(data == ''){
top.art.dialog({time: 1,icon: 'succeed',lock:true,content: '操作成功!',
close:function(){
win.location.href="";
}
});
}else{
top.art.dialog({time: 2,icon: 'warning',lock:true,content: data});
}
}
});
Don’t hurry say have no choice, perhaps, next intersection will meet hope.