求jsp仿百度留言板
发布网友
发布时间:2023-07-13 15:34
我来回答
共2个回答
热心网友
时间:2023-10-03 18:39
那是层的显示与隐藏,没有多神奇。设置好坐标就好了!
热心网友
时间:2023-10-03 18:39
我这里有用jsp页面设计的留言板以及留言显示代码,希望能对你有所帮助:
用户留言显示模块:
<tr>
<td height="32" colspan="5">
<div class='tabid'>
<table width="100%" border="0">
<tr>
<td height="20" colspan="5" class="STYLE10 td"><strong class="STYLE9"><span>用户评论</span>(
(共<%=(redgbook_total)%>条评论 )</strong></td>
</tr>
<% while ((redgbook_hasData)&&(Repeat1__numRows-- != 0)) { %>
<% if (!redgbook_isEmpty ) { %>
<tr>
<td height="2" bgcolor="#CCCCCC"> </td>
</tr>
<tr>
<td height="22"><span class="STYLE6"><%=(((redgbook_data = redgbook.getObject("gbook_name"))==null || redgbook.wasNull())?"":redgbook_data)%></span></td>
</tr>
<tr>
<td><span class="style1"><img src="images/pic/<%=(((redgbook_data = redgbook.getObject("gbook_icon"))==null || redgbook.wasNull())?"":redgbook_data)%>" alt="" name="gbk_icon" height="26" id="gbk_icon" /><span class="STYLE6"><%=(((redgbook_data = redgbook.getObject("gbook_content"))==null || redgbook.wasNull())?"":redgbook_data)%></span></span></td>
</tr>
<tr>
<td align="right"><span class="STYLE6"><%=(((redgbook_data = redgbook.getObject("gbook_date"))==null || redgbook.wasNull())?"":redgbook_data)%></span></td>
</tr>
<% } /* end !redgbook_isEmpty */ %>
<%
Repeat1__index++;
redgbook_hasData = redgbook.next();
}
%>
<tr>
<td>
<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><% if (MM_offset !=0) { %>
<a href="<%=MM_moveFirst%>">第一页</a>
<% } /* end MM_offset != 0 */ %> </td>
<td width="31%" align="center"><% if (MM_offset !=0) { %>
<a href="<%=MM_movePrev%>">前一页</a>
<% } /* end MM_offset != 0 */ %> </td>
<td width="23%" align="center"><% if (!MM_atTotal) { %>
<a href="<%=MM_moveNext%>">下一页</a>
<% } /* end !MM_atTotal */ %> </td>
<td width="23%" align="center"><% if (!MM_atTotal) { %>
<a href="<%=MM_moveLast%>">最后一页</a>
<% } /* end !MM_atTotal */ %> </td>
</tr>
用户留言设计模块:
<div class='tabid'>
<table width="100%" border="0" >
<tr>
<td colspan="2" class="STYLE10 td">发表评论</td>
</tr>
<tr>
<td height="36" colspan="2" valign="middle"><span class="STYLE6">选择表情:</span>
<label>
<input type="radio" name="gbk_icon" value="01.gif" checked />
<img src="images/pic/01.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="02.gif" />
<img src="images/pic/02.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="03.gif" />
<img src="images/pic/03.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="04.gif" />
<img src="images/pic/04.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="05.gif" />
<img src="images/pic/05.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="06.gif" />
<img src="images/pic/06.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="07.gif" />
<img src="images/pic/07.gif" width="30" height="30" />
<input type="radio" name="gbk_icon" value="08.gif" />
<img src="images/pic/08.gif" width="30" height="30" /></label></td>
</tr>
<tr>
<td height="54" colspan="2"><label>
<textarea name="gbk_content" cols="80" rows="5" id="gbk_content" ></textarea>
</label></td>
</tr>
<tr>
<td width="55%" align="right"><label>
<input name="building_id" type="hidden" id="building_id" value="<%= ((request.getParameter("building_id")!=null)?request.getParameter("building_id"):"") %>">
<input type="hidden" name="gbk_name" id="gbk_name" value="<%=session.getValue("MM_Username")%>"/>
<input type="hidden" name="gbk_date" id="gbk_date" value="<%=postdate%>"/>
<input name="gbk_ip" type="hidden" id="gbk_ip" value="<%= request.getRemoteAddr() %>">
<input type="hidden" name="MM_insert" value="form1">
<% if (!recmem_isEmpty ) { %>
<input type="submit" name="Submit" value="发表评论"
onClick="MM_validateForm('gbk_content','','R');return document.MM_returnValue"
/>
<% } /* end !recmem_isEmpty */ %>
</label></td>
<td width="45%" align="left"><label>
<% if (recmem_isEmpty ) { %>
<input name="Submit2" type="submit" onclick="MM_popupMsg('对不起,您尚未登录,请登陆后再发表留言!');MM_goToURL('parent','mem_login.jsp');return document.MM_returnValue" value="发表评论" />
<% } /* end recmem_isEmpty */ %>
</label></td>
</tr>
</table></div>