📄 write.jsp
字号:
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page contentType='text/html;charset=GBK'%>
<logic:notPresent name="username">
<logic:forward name="login" />
</logic:notPresent>
<logic:equal name="username" value="guest">
对不起,游客无权发表文章
</logic:equal>
<logic:notEqual name="username" value="guest">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
input { font-size: 9pt; background-image: url(images/back.gif); border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
textarea { font-size: 9pt; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.a { font-size: 9pt; text-decoration: none}
-->
</style>
<script language="JavaScript">
function checkdata() {
if( form1.topic.value=="" ) {
alert("\请输入标题 !!")
return false;
}
if( form1.content.value=="" ) {
alert("\请输入内容 !!")
return false;
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" background="images/back.gif">
<table width="619" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td height="44" nowrap>
<div align="center"><font size="2">雨季情缘 -- 分类讨论区 [发表文章]</font></div>
</td>
</tr>
<tr>
<td height="15" nowrap>
<hr>
</td>
</tr>
<tr>
<td height="346" valign="top"><html:errors/><br>
<form name="form1" method="post" action="addwrite.do" onSubmit="return checkdata()">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14%"><font size="2">文章标题:</font></td>
<td width="86%">
<input type="text" name="topic" size="60">
</td>
</tr>
<tr>
<td width="14%" valign="middle"><font size="2">文章内容:</font></td>
<td width="86%"> <font size="2">
<textarea name="content" cols="80" rows="5" wrap="hard"></textarea>
</font></td>
</tr>
<tr>
<td width="14%"> </td>
<td width="86%">
<input type="submit" name="Submit" value="写好了">
<input type="reset" name="Submit2" value="重来">
</td>
</tr>
</table>
<p>
<input type="hidden" name="type" value="<bean:write name='type' />">
<input type="hidden" name="topicid" value="<bean:write name='topicid' />">
</p>
</form>
</td>
</tr>
<tr>
<td height="375" nowrap> </td>
</tr>
</table>
<div align="right"></div>
</body>
</html>
</logic:notEqual>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -