$('#save').click(function(e){
//alert('hi');
e.preventDefault();
$.ajax({
type: "POST",
url:"/customerdetails/" + $('#company_name').val().replace(/ /g,'_') + "/",
dataType: 'json',
data: {'customer':$('#company_name').val()},
success: function(data){
//alert($('#company_name').val());
//alert('f');
//alert(data.tag);
if(data.tag){
alert("Company with the same name already exists.");
$('#company_name').val('');
return true;
}
}
//return false;
});//end of submit
//return false;
});
即時通訊使用上述代碼,但無論我想出來防止默認但不工作。請幫我無法出來防止默認
請問您能解釋一下您的問題嗎? –
我試圖使用防止默認在我的ajax後,但做了事情後,我無法點擊按鈕,基本上按鈕被卡住防止默認。 – Raajsupra