Use jQuery to call WebService of other projects
Implement login verification function
html enter username and password:
Code
Jquery reference and login event
Code
://localhost:1742/SoldierServices.asmx";
WebService code:
Code
Copy code
The code is as follows :
///
/// Summary description for SoldierServices
///
[WebService(Namespace = "http:/ /tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
return lb.UserLogin(UserLoginID, UserLoginPW);
}
[WebMethod]
public User GetUserInfo(string UserID)
{
LoginBusiness lb = new LoginBusiness();
return lb.GetUserInfo(UserID);
}
}
Note : [System.Web.Script.Services.ScriptService] is commented by default. You need to remove the comments.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn