Home  >  Article  >  Web Front-end  >  Problems and solutions when applying jQuery to login page_jquery

Problems and solutions when applying jQuery to login page_jquery

WBOY
WBOYOriginal
2016-05-16 18:44:111110browse

Recently I have been learning and trying jquery, and I feel that its ajax and ashx sending back json are a perfect combination. If we can use this method during Form verification, the login page can almost reach the ultimate simplicity. In the login page, use jquery's ajax callback to ashx to verify the username and password, and then redirect to other pages. Preliminary verification, it is possible to complete the login by manually constructing the login ticket in ashx and then returning it to the login terminal.
The next step is to introduce jquery into the login.aspx page, put jquery in the lib directory, put user.ashx in the services directory, and use jquery.ajax in login.aspx to make the call. But after the code is completed and actually used, every time I enter the login.aspx page for initialization, an error is always reported, prompting: The first line of jquery.js is missing an object, so I change the in the form verification section to , run OK. I was puzzled, and then about blank (ID?) in the msn jquery group provided a solution. The reason is that during the Form verification, we referenced jquery.js in login.aspx, so when the page is directed to lib/jquery.js , we will also find that we have not been verified and do not have the right to download this js file, so we add the web.config file in the lib directory, set the access permission of the jquery.js file to allow user=*, and also set the user.ashx file as So set. At this point, the problem is solved.


It’s my ambition, thank you about blank friends for your help!

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