fastadmin弹出输入框
layer.open({
id:1,
type: 1,
title:'删除',
skin:'layui-layer-rim',
area:['450px', 'auto'],
// closeBtn :1,//右上角的关闭按钮取消
content: ' <div class="row" style="width: 420px; margin-left:7px; margin-top:10px;">'
+'<div class="col-sm-12">'
+'<div class="input-group">'
+'<span class="input-group-addon">起始ID :</span>'
+'<input id="star_id" type="number" class="form-control" placeholder="起始ID" value="0">'
+'</div>'
+'</div>'
+'<div class="col-sm-12" style="margin-top: 10px">'
+'<div class="input-group">'
+'<span class="input-group-addon">结束ID:</span>'
+'<input id="end_id" type="number" class="form-control" placeholder="结束ID" value="0">'
+'</div>'
+'</div>'
+'</div>'
,
btn:['保存'],
btn1: function (index,layero) {
var star_id = $('#star_id').val();
var end_id = $('#end_id').val();
console.log(star_id, end_id);
if (star_id <= 0) {
layer.msg('请填写开始ID', {time: 1500, anim: 6});
return false;
}
if (end_id <= 0) {
layer.msg('请填写结束ID', {time: 1500, anim: 6});
return false;
}
Fast.api.ajax({
url: 'index/index',
data: {star_id: star_id, end_id: end_id}
}, function (data) {
Toastr.success("操作成功");
return false;
}, function () {
Toastr.error("操作失败");
return false;
});
}
});