Home > Web Front-end > JS Tutorial > body text

Problems and solutions when applying jQuery to login page_jquery

WBOY
Release: 2016-05-16 18:44:11
Original
1115 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template