?? noteadd.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"> <bean:message key="artshow.postion"/>:
<html:link page="/index.html"><bean:message key="artshow.index"/></html:link> >>
<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"> </td></tr>
<tr class="tr_1">
<td height="28px" class="td_b" colspan="2">
<html:link page="/NoteAdd.html"><bean:message key="noteadd.post"/></html:link>
<html:link page="/NoteShow.html"><bean:message key="noteadd.all"/></html:link>
</td>
</tr>
<tr><td width="25%" valign="top"> </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>
<bean:message key="noteadd.name"/>: <input type="text" name="author" /> *<br>
<bean:message key="noteadd.comefrom"/>: <input type="text" name="comefrom" /><br>
<bean:message key="noteadd.email"/>: <input type="text" name="email" /> *<br>
<bean:message key="noteadd.qq"/>: <input type="text" name="qq" /><br>
<bean:message key="noteadd.url"/>:http://<input type="text" name="weburl" /><br>
<bean:message key="noteadd.image"/>:
<select name=image onchange=showimage() >
<%for(int i=1;i<35;i++){ %>
<option value="<%=i%>"><%=i%></option>;
<% } %>
</select>
<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"> <bean:message key="artlist.title"/>:<input type="text" name="title" size="40" />
<yhcms:noteTag />
</td></tr>
<tr><td colspan="2">
<input type="submit" class="button" value="<bean:message key="all.submit"/>" onClick='return checkpost();' />
<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 + -