问题遇到的现象和发生背景
我用的是layui框架 其实就像是弹alert()中的添加成功样式差不多【我要弹的是div里的内容】
我用的是layui.open()
layer.open({
type:1
//,shadeClose: false
,title:"系统消息"
,content: $('#showDiv')
,btn:['确定','取消']
});
<div class="layui-form layui-form-item" th:if="${downrole eq 'end'}" id="showDiv">
<label class="layui-form-label" style="width: 175px; margin-left: -25px;font-weight: bold;font-size: 17px;">申请单下载</label>
<div class="layui-input-block">
<span style="margin-top: 7px;position: absolute;margin-left: 13px;font-weight: bold;font-size: 17px;"><a
th:href="@{'/assetsapprovalController/exportWord?abid='+${abid}}" target="_blank">固定资产申请下载.doc<img
src="../scheme/images/icons/xiazai.png" style="width: 20px;margin-left: 10px;"></a></span>
</div>
</div>
运行结果及报错内容
function tijiao(){
if(checkFrom()){
if(type=="5"){
dosubmit()
}else{
dosubmit()
}
}
}
dosubmit(){}
我如果把layui.open()放在tijiao() 方法里的dosubmit()后面,会出现提交完页面不跳转 但
弹框也出现,页面直接卡死不动.
我的解答思路和尝试过的方法
我试过layui.open({
type:0})
也试过用alert()来,但这个只能弹消息,好像不能。
我想要达到的结果
点击提交tijiao()会返回主页面 并把
里面的内容 作为信息弹框出现