$(document).ready(function(){
$('#send').click(function() {
var names = $('#appontment_form').serialize();
//this is how my names variable look like
//doctor=Dr.Fathmath+Shahuda&date=2013-02-27&time=1900+-+1700&phone=
var doc = $(names).filter('doctor');
if(doc !='')
{
$.ajax({
type: "post",
url: "../../includes/jqueryRequireFiles/appointmentSave.php",
data:names,
success: function(data)
{
$('#confir').text('Your Appointment Received..');
}
});
return false;
}
});
});
我有一个appontment窗体。当我点击发送链接时,它将获取文本框中的所有值,并通过serialize()函数将其放入名称变量中。我要筛选的名称变量,找出是否有任何的领域留下未填写。如果只有那么我会让阿贾克斯部分..但它不工作...任何帮助使用jquery serialize()函数进行简单表单验证
但不使用表单的使用链路发送见识到另一个页面提交button..im IM – 2013-02-27 08:21:11