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

📄 addmessage.jsp

📁 机械工业出版社的《jsp2.0动态网站开发实例指南》的源代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="shop.logBean" %>
<%!
	public String codeString(String s){
		String str=s;
                try{
			byte b[]=str.getBytes("ISO-8859-1");
			str=new String (b);
			return str;
		}catch(Exception e){return str;}
	}
%>
<html>
<head>
<title>Shop</title>
</head>
<body bgcolor=#C0C0C0>
<%	
	String title;
	String toid;
	if(session.isNew()){
		%>
		<jsp:forward page="index.jsp"/>
		<%
	}
	else {
		%>
		<jsp:useBean id="log" class="shop.logBean" scope="session"/>
		<%
		String islog=log.getIslog();
		if(!islog.equals("true")){
			%>
			<jsp:forward page="index.jsp"/>
			<%
		}
		else{
			%>
			<center>
			<jsp:getProperty name="log" property="id"/>
			,添加私人留言
			<jsp:include page="head.txt"/>
			</center>
			<%
			title=request.getParameter("title");
			if(title==null)title="";
			title=codeString(title);
			toid=request.getParameter("toid");
			if(toid==null)toid="";
			toid=codeString(toid);
		}
	}
%>
<center>
<form method="post" action="dealaddmessage.jsp" name="addmessage">
标题:<input type="text" size=20 maxlength=20 name="title" value="<%=title%>">
<br>
发送给:<input type="text" size=20 maxlength=20 name="userid" value="<%=toid%>">
<br>
内容
<br>
<textarea rows="10" cols="40" scrolling="auto" name="message">
</textarea>
<br>
<input type="submit" value="确定" name="addboard">
<input type="reset" value="重置" name="reset">
</form>

</center>
</body>
</html>

⌨️ 快捷键说明

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