layer父页面刷新

$.ajax({
   type:"POST",
   url:"{sh::U('Address/edit')}",
   data: $("#saveform").serialize(),
   dataType:"json",
   success: function (data){
		if (parseInt(data.status) === 2) {
			return floatNotify.simple(data.msg);
			return false;
		}
		else {
            layer.msg(data.msg,{icon:1},function(){
                parent.location.reload(); // 父页面刷新
                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                parent.layer.close(index);
            });
		}
    }
});

parent.location.reload(); // 父页面刷新
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
parent.layer.close(index);

posted @ 2016-05-31 15:50  TBHacker  阅读(24361)  评论(0编辑  收藏  举报