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

📄 compose.jsp

📁 一个用JSP+servlet做的的论坛
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%if (session.getAttribute("userName") == null) {
				response.sendRedirect("login.jsp");
			}%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BBS-撰写</title>
<script language="JavaScript"><!--
function validateCompose(){ 
	var MB_TITLE = document.frmCompose.MB_TITLE.value;
	var MB_CONTENT = document.frmCompose.MB_CONTENT.value;
	if (MB_TITLE ==""){
		alert("必须填写标题!");
		return false;
	}
	if (MB_CONTENT ==""){
		alert("必须填写内容!");
	return false;
	}
}
-->
</script>
</head>
<body>
<div align=center>
<form name="frmCompose" method="POST" action="ComposeServlet"
	onSubmit="javaScript:return validateCompose();">
<table border="0" width=600 bgcolor="#efefef" cellspacing="0"
	cellpadding="0">
	<tr>
		<td width="100%" align=center colspan="2" height="30"
			bgcolor="#0000FF"><font color="#FFFFFF"><b>撰写留言</b></font></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="#FCFCFC" align=right>标题:&nbsp;</td>
		<td width="80%" bgcolor="#FCFCFC"><input type="text" name="MB_TITLE"
			size="35" maxlength="30"></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="#FCFCFC" align=right valign="top">内容:&nbsp;</td>
		<td width="80%" bgcolor="#FCFCFC"><textarea rows="8" name="MB_CONTENT"
			cols="34">
</textarea></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="#FCFCFC" align=right valign="top">表情:&nbsp;</td>
		<td width="80%" bgcolor="#FCFCFC"><%for (int i = 1; i <= 40; i++) {

				%> <INPUT type="radio" value="<%=i %>" name="face" <%if(i==1){ %>checked="checked"<%} %>><img
			src="/BBS/image/<%=i %>.gif"> <%if (i % 8 == 0) {
					out.println("<br>");
				}
			}

			%></td>
	</tr>
	<tr>
		<td width="20%" bgcolor="#FCFCFC" align=right>撰写人:&nbsp;</td>
		<td width="80%" bgcolor="#FCFCFC"><font color=#FF0000><%=session.getAttribute("userName")%></font>
		</td>
	</tr>
	<tr>
		<td width="100%" align=center colspan="2" height="50"><input
			type="hidden" value="Compose" name="action"> <input type="submit"
			value="提交" name="submit">&nbsp;&nbsp; <input type="reset" value="重置"
			name="reset"></td>
	</tr>
</table>
</form>
</div>
</body>
</html>

⌨️ 快捷键说明

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