📄
字号:
范例SessionObject1.jsp源代码:
001<html>
002<head>
003<title>Session对象示例-第一网页</title>
004</head>
005<body>
006<p align="left"><font size="5">Session对象示例-第一网页</font></p>
007<hr>
008<%
009 String sessionName=(String)session.getAttribute("sessionName");
010 if((sessionName!="")&&(sessionName!=null))
011 {
012 out.println("你已经登记了你的大名为"+sessionName);
013 }
014 else
015 {
016 out.println("你是第一次接受本咨询");
017 }
18%>
019<form method="POST" action="SessionObject2.jsp">
020 <table border="0" width="28%">
021 <tr>
022 <td width="27%" align="right">
023 <p align="center">姓名:</td>
024 <td width="73%"><input type="text" name="name" size="12"></td>
025 </tr>
026 <tr>
027 <td width="27%" align="right">
028 <input type="submit" value="用户信息提交" name="B1">
029 </td>
030 <td width="73%">
031 <input type="reset" value="用户信息重写" name="B2">
032 </td>
033 </tr>
034 </table>
035</form>
036</body>
037</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -