js页面刷新

来源:互联网 发布:网贷系统源码下载 编辑:程序博客网 时间:2024/06/05 15:12

js页面刷新

刷新页面一般写在post请求的function()方法里

刷新页面 代码 刷新当期页面 window.location.reload(); 刷新父页面 window.opener.location.reload(); easyui刷新DataGrid的数据 $(‘#DataGrid’).datagrid(‘reload’);

例:

var posting = $.post(webBasePath + 'sharer/updatecj', sharer,                    function(resp) {                        window.opener.location.reload();                     });
$.post(webBasePath + 'fin/journal/multicheck/m', data, function(response) {                if (response.code == 200) {            $('#comment-dialog').dialog('close');            $('#dataList').datagrid('reload');            showMsg(response.msg);            window.location.reload();         } else {            if (response.msg) {                $('#comment-dialog').dialog('close');                showMsg(response.msg);                window.location.reload();            }        }    });
原创粉丝点击