Home > Web Front-end > JS Tutorial > Implement simple ajax_jquery using jquery

Implement simple ajax_jquery using jquery

WBOY
Release: 2016-05-16 17:29:50
Original
1022 people have browsed it
-->html page
Copy code The code is as follows:


< ;html xmlns="http://www.w3.org/1999/xhtml">

Username verification example
< script src="../js/jquery-1.7.2.js" type="text/javascript">
         


JAX instance for user name verification
< ;!--There is no need to use a form for data submission in ajax mode, so there is no need to write a form-->

< ;input type="button" value="Submit" onclick=""/>






—>js page
Copy code The code is as follows:

function verify () {
$ ("#username"). Keyup (function () {
var user = $ (this) .Val ();
var userObj = $ (this);
 "#result").text(data);
}



—>aspx page



Copy the code
The code is as follows: <% Response.Clear(); string str_name = Request["userobj"];
if (str_name == "xtyang")
{

Response.Write("ok");
}
else
{
Response.Write("no ");
}
Response.End();
%>


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