topandbottom.java
来自「wml和jsp实现wap网站后台管理及手机显示的过程。」· Java 代码 · 共 47 行
JAVA
47 行
package tagclass;import javax.servlet.jsp.*;import javax.servlet.jsp.tagext.*;public class TopAndBottom extends TagSupport{ String title; public String getTitle() { return this.title; } public void setTitle(String newTitle) { this.title=newTitle; } public int doStartTag() throws JspException { try { pageContext.getOut().print("<table height=100% width=100%><tr height=10%><Td align=center><h1>*"+this.getTitle()+"*</h1></td></tr><TR valign=top><TD align=center>"); } catch(Exception e) { throw new JspException(e); } return EVAL_BODY_INCLUDE; } public int doEndTag() throws JspException { try { String s="</td><tr><tr height=5% valign=bottom><Td><div align=right><a href='mailto:cyndi2@mail.china.com'>联系cyndi</a>|<a href='help.htm'>查看帮助</a>|<a href='http://herald.seu.edu.cn'>艺文频道</a></div><div align=center>herald版权所有</div></td></tr></table>"; String t=new String(s.getBytes("gb2312"), "ISO8859_1"); pageContext.getOut().print(t); } catch(Exception e) { throw new JspException(e); } return EVAL_PAGE; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?