验证码邮箱检验jsp代码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
var email = $("#tbCommentEmail").val();
var authenNum = $("#tbAuthenCode").val();
var authenId = $("#span_comment_test").html();
$("#lnkRereshAuthenCode").html("<span style='color:red'>刷新中...</span>");
return false;
}
function RefreshImg(response){
$("#imgAuthenCode").attr("src","/Modules/CaptchaImage/ValidCodeImage.aspx?id="+encodeURIComponent(response));
ShowCommentMsg(data.d["ReturnData"]);//"抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
}
// AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
//}
$("#wrapAuthenCode").show();
}
var comment = {};
comment.authenNum = authenNum;
comment.authenId= authenId;
comment.parentId = 0;
comment.blogId = 0;
$("#tbAuthenCode").val("");
CommentNotify(data.d["CommentID"]);
}
else {
if($("#wrapAuthenCode").css("display")=="none"){
ShowAuthenCode();
$("#tip_AuthenCode").css("color","red");
$("#tip_AuthenCode").html("请输入验证码!");
<SCRIPT type=text/javascript>
var commentAuthorHasChecked = false;
var commentAuthorIsValid = false;
var commentUrlIsValid = true;
var commentEmailIsValid = true;
$("#tip_AuthenCode").html('');
}
function CheckAuthor(isOnblur){
commentAuthorHasChecked = true;
var maxLength = 30;
}
if ($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
alert("该评论已发表过!");
return;
}
if(!commentEmailIsValid){
isValid = false;
}
if(!CheckCommentContent()){
isValid = false;
//alert(xhr.responseText);
}
} ); Fra bibliotek } function RefreshAuthenCode(){
AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",RefreshImg);
}
if(!authenCodeIsValid){
isValid = false;
}
if(!hasLogined && !commentUrlIsValid){
isValid = false;
isValid = false;
}
if(!hasLogined && !commentAuthorHasChecked){
CheckAuthor();
}
},
error: function(xhr) {
ShowCommentMsg("抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
$("#span_comment_test").html(response);
$("#lnkRereshAuthenCode").html("看不清,换一个");
}
function ShowAuthenCode(){
//if($("#wrapAuthenCode").css("display")=="none"){
if(!hasLogined && !commentAuthorIsValid){
isValid = false;
}
if(!authenCodeHasChecked){
CheckAuthenCode();
$("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]);
$("#tip_AuthenCode").html('');
RefreshAuthenCode();
comment.email = email;
comment.title = '';
comment.content = content;
comment.parentCommentId = $("#span_parentcomment_id").html();
var authenCodeHasChecked = false;
var authenCodeIsValid = true;
var hasLogined = false;
function PostComment() {
var isValid = true;
}
if(!isValid){
return;
}
var content = $("#tbCommentBody").val();
if(content.length>2000){
alert("评论内容过长!不允许发布!");
contentType: "application/json; charset=utf8",
success: function(data) {
if (data.d["IsSuccess"]) {
ShowCommentMsg("感谢您的回复:)");
//RereshComments2(comment.parentId);
$("#tbCommentBody").val('');
//$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"<br/>")+"<br/><br/>");
return;
}
if(content.indexOf(" E E E ")>=0){
alert("该内容不允许布!");
return;
function ShowAuthenCodeOk(response){
UpdateAuthenCode();
$("#tbAuthenCode").val("");
$("#wrapAuthenCode").show();
comment.sourceUrl = '';
comment.author = $("#tbCommentAuthor").val();
comment.url = $("#tbCommentAuthorUrl").val();
comment.authenCode = $("#tbAuthenCode").val();
$.ajax({
url: '/ws/CommentService.asmx/AddAnonymousComment',
data: $.toJSON(comment),
type: "post",
dataType: "json",
}
$("#tip_comment").html("评论提交中...");
$("#span_comment_posted").html(content);
//content = content.replace("'", "\\'");
if($("#tbCommentAuthor").val().length == 0){
相关文档
最新文档