⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 noteanswer.jsp

📁 功能说明: 前台:文章浏览、发表留言、Game、Music 后台:文章相关:发表文章、修改文章、删除文章、批量移动文章 栏目相关:增加栏目、修改栏目、删除栏目、栏目链接、栏目排序 系统栏目分
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/app/inc/taglibs2.jsp"%>
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><bean:message key="admin.note.title"/></title>
<script language="JavaScript">
	function checklength(theform){
  	alert("你即将发表的留言长度为 : "+theform.content.value.length+" 字节");
  }
  function showimage() {
      document.noteimg.src= "../app/images/avatars/"+ document.forms[0].image.options[document.forms[0].image.selectedIndex].value+".gif";
  }
  function checkpost(){
		
	if (document.forms[0].author.value.length == 0) {
		alert("名称不能够为空.");
		document.forms[0].author.focus();
		return false;
	}
	
	if (document.forms[0].author.value.length >12) {
		alert("名称长度不能够大于12个字符.");
		document.forms[0].author.focus();
		return false;
	}
	if (document.forms[0].author.value.indexOf(" ")!=-1){
		alert("名称不能够包含空格");
		document.forms[0].author.focus();
		return false;
	}

	if (document.forms[0].email.value.length == 0) {
		alert("E_mail长度不能够等于零.");
		document.forms[0].email.focus();
		return false;
	}
	if (document.forms[0].email.value.length > 0 && !document.forms[0].email.value.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) ) {
		alert("请填写正确的E_mail地址");
		document.forms[0].email.focus();
		return false;
	}
	if (document.forms[0].content.value.length <=0) {
		alert("留言不能够为空.");
		document.forms[0].content.focus();
		return false;
	}
	if (document.forms[0].content.value.length > 1000) {
		alert("留言长度不能够大于1000.");
		document.forms[0].content.focus();
		return false;
	}
	if (document.forms[0].title.value.length <= 0) {
		alert("留言标题不能够为空.");
		document.forms[0].title.focus();
		return false;
	}
	if (document.forms[0].title.value.length > 30) {
		alert("留言标题长度不能够大于30.");
		document.forms[0].title.focus();
		return false;
	}
} 
</script>
</head>
<body>
<table class="tab1" align="center" width="780px"  cellSpacing="0" cellPadding="0">
	<tr><td width="20%" valign="top"><%@ include file="../adminleft.jsp"%></td>
		<td class="td_l" width="75%" align="center" valign="top"><br><br><br><br>
			<center><font color="red"><html:errors /></font></center><br>
			<table class="tab1" width="90%" cellSpacing="0" cellPadding="0">
			<html:form action="/manage/NoteAnswer.html" method="post">
			<input type="hidden" name="action" value="post" />
			<input type="hidden" name="id" value="<bean:write name="curNote" property="id"/>" />
			<tr align="center" class="tr_1">
				<td colspan="7" height="30px" class="td_b"><bean:message key="admin.note.title"/>  --<bean:write name="curNote" property="title"/>--</td>
			</tr>
			<tr><td colspan="2"><br>
					&nbsp;&nbsp;<bean:message key="noteadd.name"/>:&nbsp;&nbsp;<input type="text" name="author" value="<bean:write name="curNote" property="author" />" />&nbsp;*<br>
					&nbsp;&nbsp;<bean:message key="noteadd.comefrom"/>:&nbsp;&nbsp;<input type="text" name="comefrom" value="<bean:write name="curNote" property="comefrom" />" /><br>
					&nbsp;&nbsp;<bean:message key="noteadd.email"/>:&nbsp;&nbsp;<input type="text" name="email" value="<bean:write name="curNote" property="email"/>" />&nbsp;*<br>
					&nbsp;&nbsp;<bean:message key="noteadd.qq"/>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="qq" value="<bean:write name="curNote" property="qq"/>" /><br>
					&nbsp;&nbsp;<bean:message key="noteadd.url"/>:http://<input type="text" name="weburl" value="<bean:write name="curNote" property="weburl" />" /><br>
				</td>
			</tr>
			<tr><td class="td_t"><br>
				&nbsp;&nbsp;<bean:message key="artlist.title"/>:&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<td class="td_t">&nbsp;
				<input type="text" name="title" size="40" value="<bean:write name="curNote" property="title"/>"/><br>
			</td></tr>
			<tr><td class="td_b">&nbsp;&nbsp;<bean:message key="admin.note.content"/>:</td>
				<td class="td_b">&nbsp;
				<textarea name="content" rows="5" cols="50"><bean:write name="curNote" property="content"/></textarea>
			</td></tr>
			<tr><td class="td_b"><bean:message key="admin.note.title"/>:</td>
				<td class="td_lb">&nbsp;
				<textarea name="answer" rows="5" cols="50"><bean:write name="curNote" property="answer"/></textarea>
			</td></tr>
			<tr><td colspan="2" height="30px" align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="submit" value="<bean:message key="all.submit"/>" onClick='return checkpost();' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="reset" value="<bean:message key="all.reset"/>"/>
			</td></tr>
			</html:form>
			</table>
		</td>
	</tr>
</table>
</body>
</html:html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -