| Function | Source | Option | Remarks |
| 权限提示 |
<a class="btn btn-primary" id="primary">权限提示</a>
$('obj').click(function () {
$('body').alert({
type: 'primary'
})
})
|
默认参数type: 'success', title: '提示', content: '恭喜,操作成功!', btntext: '确定', modal: true, draggabled: false, even: 'click' buttons:[] |
需要引入chur.min.js / chur.css 调用文件名根据需求自行更改type: '', //类型有5种info,success,warning,primary,danger title: '', //标题 content: '', //提示文字信息 btntext: '', //按钮文字 modal: false, //模式,开关灯 draggable: false //是否可拖动 even: 'click' //鼠标触发事件 buttons:[] //多个按钮组 |
| 成功提示 | <a class="btn btn-primary" id="primary">权限提示</a> $('obj').click(function () { $('body').alert({ type: 'success' }) }) |
同上 | 同上 |
| 警告提示 | <a class="btn btn-primary" id="primary">权限提示</a> $('obj').click(function () { $('body').alert({ type: 'warning' }) }) |
同上 | 同上 |
| 出错提示 | <a class="btn btn-primary" id="primary">权限提示</a> $('obj').click(function () { $('body').alert({ type: 'danger' }) }) |
同上 | 同上 |
| 询问提示 | <a class="btn btn-primary" id="primary">权限提示</a> $('obj')..click(function () { $('body').alert({ type: 'info', buttons: [{ id: 'yes', name: '确定', callback: function () { alert('确定') } }, { id: 'no', name: '取消', callback: function () { alert('取消') } }] }) }) |
同上 |
buttons[ { id:'' //按钮唯一Id name:'' //按钮文字 callback:'' //按钮回执事件 } ] |
| 窗口调用1 |
$('.obj').click(function () {
} |
默认参数
id:null min:true
max:true time:null resize:true drag:true button:null |
需要引入ChurAlert.min.js
id:null //设定对话框唯一标识 min:true //是否取用最小化按钮
max:true //是否取用最大化按钮 time:null //定时关闭窗体 (毫秒) resize:true //是否取用窗体尺寸控制 drag:true //是否允许拖动 button:null //按钮组 (数组调用方法同上) |
| 窗口调用2 |
$('.obj').click(function () {
$.dialog({
title: '我不能拖动,我15秒后自动关闭',
content: 'url:http://www.e-eegoo.com',
fixed: true,
drag: false,
resize: false,
time: 35,
width: 788,
height: 504
}).max();
})
|
同上 | 同上 |
| 窗口的传值 | |||
在以上框框中输入值点下边按钮传值 给异步页面赋值 |
$('.obj').click(function () {
if (test) {
$.dialog({
id: 'test',
content: 'url:Template/test1.html',
data: $('#test').val()
})
}
}) |
if(test) 判断窗口是否打开,必须指定窗口Id data:为传递参数 |
test1.html 内容--- var api = frameElement.api;//定义父级框架 var data = api.data //接收参数 function(){.....}
|
调用异步页面参数 |
$('.obj').click(function () {
if (test2) {
$.dialog({
id: 'test2',
content: 'url:Template/test1.html',
data: $('#test2').val()
})
}
}) |
test1.html 内容--- var api = frameElement.api;//定义父级框架 var data = api.data //接收参数 function(){.....}
|
|