">
SinaWeiBo.WebService1.cunzai($ (this).val(), a, b)
{
function a(result) {
if (result == "郵件信箱已存在請重新輸入") {
$(' #txtusername').val('');
$('#txtusername').focus();
$('#emailyz').text(result);
}
else { $('#emailyz').text('可以使用'); }
}
function b() {
$('#emailyz').text('沒有回傳值');
}
}
webservice:
public string cunzai(string txtusername)
{
//判斷信箱存不存在
try
{
SinaWeiBo.BLL.T_Users btry
{
SinaWeiBo.BLL.T_Users bj1 = news1 ();
DataSet ds = new DataSet();
ds = bt1.GetList(" T_UserEmail='" txtusername "'");
string cha = ds.Tables[0].Rows[0 ][0].ToString();
return "該郵箱已存在請重新輸入";
}
catch {
return "正確";
}
}