我設置表單標籤的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的控制檯還沒有呈現出一些錯誤信息
我編輯了我上面的整個代碼 – Vishwajeet