下面的代码运行 alert("Success"); 当它单独并且函数 fSuccess 被注释掉时,它不会触发 fSuccess() 函数。这是为什么?非常感谢您的参与。
$.when(chkUsername(), chkPassword()).done(function () {
if (boolusername == 0) {
$("#ErrorUN").css("display", "block");
}
else {
if (boolpassword == 0) {
$("#ErrorP").css("display", "block");
}
else {
$.ajax({
type: "POST",
url: "Registration.aspx/Success",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function () { }
});
}
}
}); //when
Imports System.Web.Services
Public Class Registration
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
<WebMethod()>
Public Shared Sub Success()
Dim strBreakPoint As String = "qwerty"
End Sub
结束类