我有以下代码,但是我在使用window.location时遇到了问题。
$('.test_container a').click(function() {
$.ajax({
url: $(link).attr('href'),
type: 'GET',
dataType: 'json',
beforeSend: function() {
$('#lightbox').show();
},
success: function(data) {
$('#lightbox').hide();
window.location(data);
}
});
return false;
});
如果使用 window.location.replace 确实可以解决问题,但这样会导致浏览器的返回按钮无法正常工作。
有没有人知道任何解决方案?
谢谢