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

📄 noteadd.jsp

📁 功能说明: 前台:文章浏览、发表留言、Game、Music 后台:文章相关:发表文章、修改文章、删除文章、批量移动文章 栏目相关:增加栏目、修改栏目、删除栏目、栏目链接、栏目排序 系统栏目分
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/app/inc/header.jsp"%>
<html:html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title><bean:message key="noteadd.title"/></title>
<meta name="keywords" content="www.yyhweb.com,yhcms,java,yyh,由由华网,个人网站,新闻系统,文章管理系统,">
<meta name="description" content="www.yyhweb.com由由华网(个人网站),爱好编程,热爱生活">
<meta name="generator" content="YHCMS 2.0,yhcms">
<meta name="author" content="stephen,yyh,yyh_email@126.com">
<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 >10) {
		alert("名称长度不能够大于10个字符.");
		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].checknum.value.length <= 0) {
		alert("请填写正确的验证码.");
		document.forms[0].checknum.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;
	}
	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;
	}
	
} 
</script>
</head><body>
<br><table class="tab1" align="center" width="760px"  cellSpacing="0" cellPadding="0">
	<tr height="24px">
			<td class="td_b" width="12%" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;<bean:message key="artshow.postion"/>:&nbsp;&nbsp;&nbsp;&nbsp;
			<html:link page="/index.html"><bean:message key="artshow.index"/></html:link>&nbsp;&nbsp;>>&nbsp;&nbsp;
			<html:link page="/NoteAdd.html"><bean:message key="noteadd.post"/></html:link>
	</td></tr>
	<tr class="tr_1"><td height="4px" colspan="2"></td></tr>
	<tr><td class="td_tb" colspan="2">&nbsp;</td></tr>
	<tr class="tr_1">
		<td height="28px" class="td_b" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<html:link page="/NoteAdd.html"><bean:message key="noteadd.post"/></html:link>&nbsp;&nbsp;&nbsp;&nbsp;
		<html:link page="/NoteShow.html"><bean:message key="noteadd.all"/></html:link>
		</td>
	</tr>
	<tr><td width="25%" valign="top">&nbsp;</td>
		<td class="td_l" width="75%" valign="top"><br>
			<table class="tab">
			<html:form action="/NoteAddAction.html" method="post">
			<tr><td><center><font color="red"><html:errors /></font></center>
					&nbsp;&nbsp;<bean:message key="noteadd.name"/>:&nbsp;&nbsp;<input type="text" name="author" />&nbsp;*<br>
					&nbsp;&nbsp;<bean:message key="noteadd.comefrom"/>:&nbsp;&nbsp;<input type="text" name="comefrom" /><br>
					&nbsp;&nbsp;<bean:message key="noteadd.email"/>:&nbsp;&nbsp;<input type="text" name="email" />&nbsp;*<br>
					&nbsp;&nbsp;<bean:message key="noteadd.qq"/>:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="qq" /><br>
					&nbsp;&nbsp;<bean:message key="noteadd.url"/>:http://<input type="text" name="weburl" /><br>
					&nbsp;&nbsp;<bean:message key="noteadd.image"/>:
					<select name=image onchange=showimage() >
					<%for(int i=1;i<35;i++){ %>
				    	<option value="<%=i%>"><%=i%></option>;
				    <% } %>
					</select>
					&nbsp;&nbsp;<bean:message key="noteadd.code"/>:<input type="text" name="checknum" size="4" maxlength="4"/>
					<img border=0 src='yhdrawimg'><br>
				</td>
				<td><img src=app/images/avatars/1.gif name=noteimg align=top /></td>
			</tr>
			<tr><td class="td_tb" colspan="2">&nbsp;&nbsp;<bean:message key="artlist.title"/>:<input type="text" name="title" size="40" />
				<yhcms:noteTag />
			</td></tr>
			<tr><td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="submit" class="button" value="<bean:message key="all.submit"/>" onClick='return checkpost();' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="reset" class="button" value="<bean:message key="all.reset"/>" />
			</td></tr>
			</html:form>
			</table>
		</td>
	</tr>
</table>
</body></html:html>
<%@ include file="/app/inc/footer.jsp"%>

⌨️ 快捷键说明

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