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

Implement simple ajax_jquery using jquery

WBOY
WBOYOriginal
2016-05-16 17:29:501019browse
-->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();
%>


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