Home > Web Front-end > JS Tutorial > body text

JQuery calls webservice to implement email verification (checking whether it is available)_jquery

WBOY
Release: 2016-05-16 17:33:32
Original
1058 people have browsed it
Copy code The code is as follows:






SinaWeiBo.WebService1.cunzai($(this).val(), a, b)
{
function a(result) {
if (result == "The email already exists, please re-enter") {
$('#txtusername').val('');
$('#txtusername').focus();
$('#mailyz').text(result);
}
else { $('#emailz').text('can be used'); }
}
function b() {
$('#emailz').text( 'No return value');
}
}

webservice:
Copy code The code is as follows:

public string cunzai(string txtusername)
{
//Determine whether the mailbox exists
try
{
SinaWeiBo.BLL. T_Users bt1 = new BLL.T_Users();
DataSet ds = new DataSet();
ds = bt1.GetList(" T_UserEmail='" txtusername "'");
string cha = ds.Tables [0].Rows[0][0].ToString();
return "The email already exists, please re-enter";
}
catch {
return "Correct";
}
}
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!