如何添加:
输入:“POST”, url:“login.php”,在下面的JS代码中(完全在评论中“在这里做你的ajax调用和处理......”:
$(document).ready(function()
{
$("#submit_butt").click( function()
{
var conf =
{
frequency: 5000,
spread: 5,
duration: 600
};
/* do your AJAX call and processing here...
....
....
*/
// this is the call we make when the AJAX callback function indicates a login failure
$("#login").vibrate(conf);
// let's also display a notification
if($("#errormsg").text() == "")
{
$("#loginform").append();
// clear the fields to discourage brute forcing :)
$("#password").val("");
document.forms['login_form'].elements['username'].focus();
}
else
{
}
});
});
答案 0 :(得分:0)
替换
/* do your AJAX call and processing here...
....
....
*/
使用
$.ajax({
type: "POST",
url: "login.php"
});
答案 1 :(得分:0)
为Ajax处理添加此代码
$.ajax({
url: "login.php",
data: param,
success: function(result) {
alert('SUCCESS');
}
});