$.messager.alert 彈出框的位置隨頁面的長度越大越靠下。
$.messager.alert('消息','只能對單個客戶進行清款!','info');
彈出的位置 太靠下方。修改為:
$.messager.alert({ title:'消息',msg:'只能對單個客戶進行清款!',icon:'info', top:$(window).height()/4 });
帶回調函數的 消息框:
$.messager.alert({
title:'消息',
msg:'電話號碼 只能是數字!',
icon: 'info',
width: 300,
top:200 , //與上邊距的距離 fn:function(){ document.getElementById('dlg_tel_number').focus();//文本框 獲取焦點 return; } });