function Login() {
  var uid = $get("txtUserName").value;
  var pwd = $get("txtPassword").value;
  Sys.Services.AuthenticationService.login(
   uid,pwd,false,null,null,
   OnLoginCompleted,OnLoginFailure,null);
}

function OnLoginCompleted(isValid,userContext, methodName) {
  if (isValid) {
    alert("You logged in!");
  }
  else {
    alert("Login failed.");
  }
}

function OnLoginFailure(error, userContext, methodName)
{
  alert("Attempt failed: " + error.get_message());
}

相关文章:

  • 2021-10-17
  • 2021-11-17
  • 2021-08-01
  • 2021-12-25
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
猜你喜欢
  • 2021-06-23
  • 2022-12-23
  • 2021-12-09
  • 2021-08-26
  • 2022-12-23
相关资源
相似解决方案