<%@ Page Language="C#" AutoEventWireup="true" CodeFile="D33333333.aspx.cs" Inherits="D33333333" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript" src="js/Check.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeyup="CheckUserName(document.getElementById('TextBox1').value"></asp:TextBox>
<asp:Image ID="Image1" runat="server" src="tupian/load.gif" /><br />
</div>
</form>
</body>
</html>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript" src="js/Check.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
用户名:<asp:TextBox ID="TextBox1" runat="server" onkeyup="CheckUserName(document.getElementById('TextBox1').value)"></asp:TextBox>
<asp:Image ID="Image1" runat="server" src="tupian/load.gif" />
<br />
<br />
</div>
</form>
</body>
</html>--%>
其实两段代码一样,上面一段是我自己新建页面写的,下面一段是我原程序多余的部分删了剩下了,总之,下面的运行得起,能实现ajax功能,上面那段实现不了,左下角提示网页中有错误,怎么回事啊,因为我要把这个功能加到我的网站里去,加进去就用不了了。实现的功能是无刷新验证用户名是否存在。
先谢谢了!!!