2012-11-02 37 views
0

我設置表單標籤的action屬性按照行工作形式的動態設置好的action屬性不能在Firefox

$("#divIsInternational span").bind('click', function() { 
    $('#action').val('bypcgDestination'); 
    var SelectedItem = $(this).attr("id"); 
    if (SelectedItem.toString() == "Domestic") { 
     $(this).removeClass().addClass("domestic selected"); 
     $(this).siblings().removeClass("selected"); 

     $("#toDefaultPage").attr("action", "home/domestic"); 
    } 
    else { 
     $(this).removeClass().addClass("international selected"); 
     $(this).siblings().removeClass("selected"); 

     $("#toDefaultPage").attr("action", "home/international"); 
    } 


    $("#isDomesticInMaster").val(SelectedItem); 

    $("#toDefaultPage").submit(); 

}); 

它可以在Chrome,但不能在Firefox罰款,我不能夠找到問題因爲Firefox的控制檯還沒有呈現出一些錯誤信息

回答

0

我要發兔子我在這裏面對的問題,實際上我被授予一個隱藏字段的id作爲action.By我無法設置表單標籤的動作字段。所以問題是id =「action」的隱藏字段。