【www.gdgbn.com--php常用代码】

<script type="text/网页特效" src="css教程/jquery-1.3.2.js"></script>
<script type="text/javascript">
function judgeusername()
{
$.ajax({
type:"get",
url:"ajaxuserinfomodify.asp教程x",
datatype:"html",
data:"username="+$("#txtname").val(),
beforesend:function(xmlhttprequest)
{
$("#showresult").text("正在查询");
//pause(this,100000);
},
success:function(msg)
{
$("#showresult").html(msg);
$("#showresult").css("color","red");
},
complete:function(xmlhttprequest,textstatus)
{
//隐藏正在查询图片
},
error:function()
{
//错误处理
}
});
}
</script>




div>
div>

aspx文件

protected void page_load(object sender, eventargs e)
{
string username = request.querystring["username"].tostring ();
if (username == "james hao")
{
response.write ("用户名已经存在!");
}
else
{
response.write ("您可以使用此用户名!");
}
}

本文来源:http://www.gdgbn.com/jiaocheng/29740/