Easyui中 $.messager.alert出现的位置

一、不需要定位置

$.messager.alert('提示','未找到符合条件的记录!','warning');

 

二、调整弹窗位置且没有回调函数

$.messager.alert({ title:'提示',msg:'未找到符合条件的记录!',icon:'warning', top:$(window).height()/4,left:$(window).width()/2});

 

三、带有回调函数

$.messager.alert({
title:'提示',
msg:'未找到符合条件的记录!',
icon: 'warning',
width: 300,
top:200 , //与上边距的距离
fn:function(){
  document.getElementById(
'dlg_tel_number').focus();//文本框 获取焦点 return;
}
});

 

参考:https://www.cnblogs.com/hailexuexi/p/8668237.html

posted @ 2021-09-26 14:00  敲键盘的喵~  阅读(718)  评论(0编辑  收藏  举报