0
我使用Jquery進行表單分割。但表單元素正在追加到URL中。在JQUERY中提交一個表單,在URL中附加不同的變量
任何想法如何防止此功能。
代碼提交表單
$("#form_chk_app_pnt_tdy").submit(function()
{
//alert("pfo_gnCheckNumber");
$.ajax({
url:'cfc/print.cfc?method=getMassChkReqIDs',
type:'GET',
beforeSend: function(xhr,settings)
{
//alert(xhr.readyState);
//setTimeout(function(){
$('#dv_gnCheckNumber').hide();
$('#load_image').show();
//},2000);
},
success:function(data,textStatus,xhr)
{
//alert(xhr.readyState);
$('#dv_gnCheckNumber').show();
$('#pfo_gnCheckNumber').attr('disabled','disabled');
$('#load_image').hide();
//$("#form_chk_app_pnt_tdy").click();
//(event.preventDefault) ? event.preventDefault() : event.returnValue = false;
},
error:function(xhr,textStatus,errorThrown)
{
alert(errorThrown);
}
});
});
雖然提交此表我得到複選框值和按鈕值在URL中。我不想要這種行爲。
使用'POST'類型,'GET'請求就是這樣的。 –