jquery 绑定的事件触发不了,求指教
jQuery 代码:
$(document).ready(function(){
$("#tbUserName").bind("change",function(){
$.ajax({
type:"Get",
url:"/AjaxPages/AjaxCodes.aspx",
dataType:"JSON",
data:"userName="+$("#tbUserName").val()+"&flg=username",
success:function(msg)
{
$("[id$=lbCheckUserName]").html(msg);
}
});
});
$("#tbPassword").bind("change",function(){
var reg=/^[0-9]{6,}$/;
var password=$("#tbPassword").val();
if(password.match(reg)==null)
{
$("#lbCheckPassword").text("error");
}
else
{
$("#lbCheckPassword").text("OK");
}
});
});
asp 页面:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserRegister.aspx.cs" Inherits="MyBookShop.UserPages.UserRegister"
MasterPageFile="~/MasterPages/index.Master"%>
<asp:Content ID="content2" runat="server" ContentPlaceHolderID="head">
<script type="text/javascript" src="../js/jquery-1.3.2-vsdoc2.js"></script>
<script type="text/javascript" src="../js/JCheckInfo.js"></script>
</asp:Content>
<asp:Content ID="content3" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="用户名"></asp:Label>
</td>
<td>
<input id="tbUserName" type="text" />
</td>
<td>
<asp:Label ID="lbCheckUserName" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label3" runat="server" Text="密码"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbPassword" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="lbCheckPassword" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" runat="server" Text="确认密码"></asp:Label>
</td>
<td>
<asp:TextBox ID="tbConfirmPassword" runat="server"></asp:TextBox>
</td>
<td>
<asp:Label ID="lbCheckConfirmPassword" runat="server" Text=""></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="真实姓名"></asp:Label&g