easyui wait page(等待頁面) ajax
easyui wait page(等待頁面) ajax
資料來源: Bard
解法01.
$.messager.progress({ title: 'Loading Data', msg: 'Please wait...' }); $.ajax({ url: '/data.json', success: function(data) { // 处理数据 $.messager.progress('close'); }, error: function(xhr, status, error) { $.messager.alert('Error', error); $.messager.progress('close'); } });
解法02.
<div id="waitPage" style="display: none;"> <img src="loading.gif" alt="Loading..." /> </div>
.ajax({ url: "your_url", dataType: "json", beforeSend: function() { $("#waitPage").show(); }, success: function(data) { // 处理数据 }, complete: function() { $("#waitPage").hide(); } });
One thought on “easyui wait page(等待頁面) ajax”
網站模板整合後端系統入門相關範例