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

📄 read.jsp

📁 这是一个用java实现的论坛
💻 JSP
字号:
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ page contentType='text/html;charset=GBK'%>
<logic:notPresent name="username">
  <logic:forward name="login" />
</logic:notPresent>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
table {  font-size: 12px}
input {  border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
function CheckForm() {
    if (!chknumber(TheForm.page.value) || TheForm.page.value == "") {
			alert ("请正确填写要跳到的页数!");
		return(false);
		}

	return(true);
	}

function chknumber(checkStr) {
  var checkOK = "0123456789.+-";
  var allValid = true;
  var checkCode = 0;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    if (checkOK.indexOf(ch) == -1) {
      allValid = false;
      break;
    }
    if ((ch == '+' || ch == '-') && i > 0) {
      allValid = false;
      break;
    }
    if (ch == '.') {
      checkCode += 1;
      if (checkCode > 1) {
        allValid = false;
        break;
      }
    }
  }
  return(allValid);
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" background="images/back.gif">

	
	 
<table width="610" border="0" align="right" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="44"> 
      <div align="center"><font size="2">雨季情缘 -- 阅读信件</font></div>
    </td>
  </tr>
  <tr> 
    <td height="7"> 
      <div align="right"></div>
    </td>
  </tr>
  <tr>
    <td height="8">
      <hr>
    </td>
  </tr>
  <tr> 
    <td height="65" valign="top"> 
      <table width="628" border="0" cellspacing="2" cellpadding="0" height="28">
        <tr> 
          <td height="24" width="65" bgcolor="e8e8e8">来自</td>
          <td height="24" width="51" bgcolor="e8e8e8">新</td>
          <td height="24" width="258" bgcolor="e8e8e8">标题</td>
          <td height="24" width="178" bgcolor="e8e8e8">时间</td>
          <td height="24" width="52" bgcolor="e8e8e8">删除</td>
        </tr>
		<logic:present name="maillist">
		<logic:iterate id="mail" name="maillist" offset="0" length="15">
        <tr><td width='65'><a href="user.do?username=<bean:write name='mail' property='fromuser' />"><bean:write name="mail" property="fromuser" /></a></td><td width='51'><logic:equal name="mail" property="isnew" value="1"><font color="#FF0000">新</font></logic:equal></td><td width='258'><a href="mailcontent.do?mailid=<bean:write name='mail' property='id' />"><bean:write name="mail" property="subject" /></a></td><td width='178'><bean:write name="mail" property="mailtime" /></td><td width='52'><a href="delmail.do?mailid=<bean:write name='mail' property='id' />">删除</a></td></tr>
		</logic:iterate>
		</logic:present>
      </table>
	  <div align="right">
              <form name="TheForm" method="post" action="read.do" onSubmit="return CheckForm()">
       
				<logic:greaterThan name="currentPage" value="1">
                <a href="read.do?page=<bean:write name='previous' />">上一页</a>
                </logic:greaterThan>
                &nbsp; 
				<logic:lessThan name="currentPage" value="<%=(String)request.getAttribute("pageCount") %>" >
                <a href="read.do?page=<bean:write name='next' />">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp; 
                </logic:lessThan>
                第 <bean:write name="currentPage"  /> / <bean:write name="pageCount" /> 
                页 &nbsp;跳到 第 
                <input type="text" name="page" size="3" class="text">
                <input type="submit" name="Submit" value="跳转" class="botton">
              </form>
           </div>
    </td>
  </tr>
  
</table>
<div align="right"></div>
</body>
</html>

⌨️ 快捷键说明

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