当模糊功能发出警报消息时,我从数据库中获取电子邮件字段的值。在该警报消息中,如果我单击“确定”意味着它将获取配置文件并显示在我的视图中..这可能吗?
jQuery代码:
<a id="checkEmail" href="#" ></a> | <a id="getCandidate"></a>
<script type ="text/javascript">
$('#getCandidate').text('Get Profile') // Sets text for email.
.attr('href', '#');
$("#Email").blur(function () {
$('#checkEmail').trigger('click');
$('#getCandidate').text('Get Profile')
.attr('href', 'GetCandidateDetail?validateEmail=' + $('#Email').val());
});
$(document).ready(function () {
$('#checkEmail').click(function () {
var name = $('#Email').val();
var data = 'validateEmail=' + name;
$.ajax({
type: "GET",
url: "ValidateCandidate",
data: data,
success: function (data) {
alert(data);
}
});
return false;
});
});
</script>