ent_test").html(response);
$("#lnkRereshAuthenCode").html("看不清,换一个");
}
function ShowAuthenCode(){
//if($("#wrapAuthenCode").css("display")=="none"){
// AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
//}
$("#wrapAuthenCode").show();
}
function ShowAuthenCodeOk(response){
UpdateAuthenCode();
$("#tbAuthenCode").val("");
$("#wrapAuthenCode").show();
$("#tip_AuthenCode").html('');
}
function CheckAuthor(isOnblur){
commentAuthorHasChecked = true;
var maxLength = 30;
if($("#tbCommentAuthor").val().length == 0){
$("#tip_author").html("请输入您的昵称!");
commentAuthorIsValid = false;
return false;
}
else if($("#tbCommentAuthor").val().length > maxLength){
$("#tip_author").html("昵称不允许超过" + maxLength + "个字符!");
commentAuthorIsValid = false;
return false;
}
else{
//if(isOnblur){
AjaxPost("/ws/CommentService.asmx/IsAuthorExist","{author:'"+$("#tbCommentAuthor").val()+"'}" ,OnCheckAuthorExist);
//}
//else{
// $("#tip_author").html("");
// commentAuthorIsValid = true;
//}
return true;
}
}
function OnCheckAuthorExist(response){
if(!response){
$("#tip_author").html("");
commentAuthorIsValid = true;
}
else{
$("#tip_author").html("该昵称已被使用,请更换昵称");
commentAuthorIsValid = false;
}
}
function CheckUrl(){
var maxLength = 50;
var url = $("#tbCommentAuthorUrl").val();
if(url.length == 0){
commentUrlIsValid = true;
return true;
}
else if(url.length > maxLength){
$("#tip_