//下面是自己添加的,点击登录后执行的按钮(submit)的处理行为(Handler处理的意思)
$().ready(function() { $("#login_form").validate({
submitHandler: function (form)
{
// do other stuff for a valid form
$.post('Manager/Lib/Action/IndexAction.class.php', $("#login_form").serialize(), function(data)
{
$('#ajax_message').html("OK");
window.location.href='http://127.0.0.1/Hospital/Manager/';
});
}
});
});我想把值传到Manager/Lib/Action/IndexAction.class.php 这个PHP文件下,然后在这个PHP文件中是这样写的print "Form submitted successfully: ".$_POST['firstname']."</b> and your email is <b>".$_POST['password']."</b><br>";输入框的login_form、 firstname 和password的id和name的名字都对,但是就是不显示,为什么啊? 最佳答案