52,797
社区成员
发帖
与我相关
我的任务
分享
function ValidationFunctionName(source, arguments)
{
var userName =document.getElementById("txtQymc");
var oBao = new ActiveXObject("Microsoft.XMLHTTP");
oBao.open("Get","CheckEntName.aspx?username=" + escape(userName.value),false);
oBao.send();
var strResult = oBao.responseText;
//如果返回 1 就代表可以使用,否则不能通过验证
alert(strResult);
if (Number(strResult) == 1)
arguments.IsValid = true;
else if(Number(strResult) == 0)
arguments.IsValid = false;
}
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
Response.Clear();
string strsql = "select count(*) from Ent_Baseinfo where Qymc='"+Request.QueryString["username"].ToString()+"'";
if(cdb.isInfo(strsql)!=0)
{
Response.Write("0");
}
else
{
Response.Write("1");
}
Response.End();
Response.Flush();
}