


A small example of JQuery implementing user name non-refresh verification_jquery
May 16, 2016 pm 05:39 PM1. Add text boxes, styles and js script references to the static page:
Code highlighting produced by Actipro CodeHighlighter (freeware)http:/ /www.jb51.net/-->
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat=" server">
<title>Untitled page</title>
<script language ="javascript" src ="../jquery-1.3.2.min.js" type ="text /javascript" ></script>
<script language ="javascript" src ="validator.js" type ="text/javascript" ></script>
<link type = "text/css" rel="stylesheet" href ="validator.css" />
</head>
<body>
<form id="form1" runat="server ">
< </div>
</div>
</form>
</body>
</html>
border:1px red solid;
}
/ /Text box style when entering text
txtname.keyup(function(){
var name=$(this).val();
if(name=="")
$(this ).addClass("txtName");
else $(this).removeClass("txtName");
})
//Verify whether the username is available when losing focus
$("# txtName").blur(function()
{
var name=$(this).val();
$.get("validator1.aspx?name=" name,null,function(response ){
$("#result").html(response);
})
})
protected void Page_Load(object sender, EventArgs e)
{
string name = Request.QueryString["name"].ToString();
if (name == "janes")
Response.Write("This user Name already exists! ");
else
Response.Write("This username can be used!");
}
}

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Detailed method to unblock using WeChat friend-assisted verification

New features in PHP 8: Added verification and signing

How to use PUT request method in jQuery?

How to solve the problem of steam login stuck in mobile token verification?

How to remove the height attribute of an element with jQuery?

jQuery Tips: Quickly modify the text of all a tags on the page

Use jQuery to modify the text content of all a tags

PHP calculates MD5 hash value of string
