.metadata/.me_tcat/webapps/FlowerShop/comment_add_ajax.jsp

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ page contentType="text/html; charset=utf-8" %>
<script type="text/javascript">
function checkForm(){
	var commentName = $("input[name=commentName]",$("#comment_ajax_add_form")).val();
	var commentMail = $("input[name=commentMail]",$("#comment_ajax_add_form")).val();
	var commentContent = $("textarea[name=commentContent]",$("#comment_ajax_add_form")).val();
	var your_email = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if(commentName == null || commentName == ""){
		$("#errorMessage").html("请输入评论人");
		return false;
	}
	if(commentMail == null || commentMail == ""){
		$("#errorMessage").html("请输入邮件地址");
		return false;
	}
	if(!commentMail.match(your_email)){
		$("#errorMessage").html("email格式不正确");
		return false;
	}
	if(commentContent == null || commentContent == ""){
		$("#errorMessage").html("请输入评论内容");
		return false;
	}
	var temp = "";
	temp = javazj_comment_date + "&" + $("#comment_ajax_add_form").serialize();
	$("button",$("#comment_ajax_add_form")).remove();
	$.ajax({
	   type: "POST",
	   cache :false,
	   url: "comment_add.do",
	   data: temp,
	   success: function(msg){
		 $.prompt(msg);
		 $("#comment_ajax_add_div").load("comment_add_ajax.jsp");
		 $("#comment_ajax_list_div").load("comment.do?"+javazj_comment_date);
	   },
	   error :function(msg){
		 $.prompt("评论失败");
		 $("#comment_ajax_add_div").load("comment_add_ajax.jsp");
	   }
	}); 
	return false;
}
</script>
 <form id="comment_ajax_add_form" method="post" name="register" action="" onsubmit="return checkForm()">
		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5">
  

					<tr>
				<th width="9%" align="right" nowrap="nowrap"><label for="seccodeverify">留言人</label></th>
				<td width="91%" align="left">
					
				  <input id="commentName" name="commentName" size="8" maxlength="40" tabindex="1" type="text"></td>
			</tr>
		
		
		<tr>
			<th align="right" nowrap="nowrap"><label for="username">联系电话</label></th>
			<td align="left">
				<input id="commentTel" name="commentTel" size="25" maxlength="40" tabindex="3" type="text">			</td>
后面还有 20 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。