日期:2014-05-17 浏览次数:20546 次
<script type="text/javascript">
function check() {
var val = document.getElementById("ContentPlaceHolder1_txtatps").value;
if (val == "") {
document.getElementById("msg").innerHTML = "<font color='red'>不允许为空</font>";
return;
}
else {
var flag = AddATPS.CheckCode(val).value;
if (flag) {
document.getElementById("msg").innerHTML = "<font color='red'>该编号可用</font>";
}
else {
document.getElementById("msg").innerHTML = "<font color='red'>该编号已存在,请重新填写</font>";
}
}
}
</script>
<input id="txtatps" type="text" runat="server" onblur="check()" /><span id="msg" style="color:Red">*</span>
[AjaxPro.AjaxMethod]
public bool CheckCode(string id)
{
bool flag = false;
flag = DataATPSLayer.GetCount(id);
return flag;
}