Jquery UI选项卡302重定向

Jquery UI选项卡302重定向,jquery,http,jquery-ui-tabs,url-redirection,Jquery,Http,Jquery Ui Tabs,Url Redirection,我使用带有以下AjaxOption的UI选项卡: **$("#ss-tabs-1, #ss-tabs-4, #ss-tabs-5").tabs({ cache: false, ajaxOptions: { cache: false, error: function (xhr, status, index, anchor) { // how do I test to ha

我使用带有以下AjaxOption的UI选项卡:

    **$("#ss-tabs-1, #ss-tabs-4, #ss-tabs-5").tabs({
        cache: false,
        ajaxOptions: {
            cache: false,
            error: function (xhr, status, index, anchor) {
                    // how do I test to handle the HTTP code 302 ? (xhr.status contains 0 here and xhr.responseText is empty!)
                if ((xhr.status == 301) || (xhr.status == 302) || (xhr.status == 303) || (xhr.status == 304) || (xhr.status == 305) || (xhr.status == 306) || (xhr.status == 307) || (xhr.status == 308)) {
                    // how do I redirect to the redirection url
                }
                else {
                    $(anchor.hash).html("Error ...<br><br>URL : " + ??? + "<br><br>Error Code : " + xhr.status + "<br>" + xhr.responseText);
                }
            }
        }
    });**
**$(“#ss-tabs-1,#ss-tabs-4,#ss-tabs-5”).tabs({
cache:false,
ajaxOptions:{
cache:false,
错误:函数(xhr、状态、索引、锚定){
//如何测试以处理HTTP代码302?(这里xhr.status包含0,xhr.responseText为空!)
如果((xhr.status==301)|(xhr.status==302)|(xhr.status==303)|(xhr.status==304)|(xhr.status==305)|(xhr.status==306)|(xhr.status==307)|(xhr.status==308)){
//如何重定向到重定向url
}
否则{
$(anchor.hash).html(“错误…

URL:+???+”

错误代码:“+xhr.status+”
”+xhr.responseText); } } } });**
我的目标是处理指示重定向的HTTP代码302。此HTTP代码由UI选项卡作为错误处理,但实际上是重定向。在使用firebug进行调试时,我在HTTP响应头中看到重定向url。如何重定向到该url而不显示错误

非常感谢

迈克