?? 0183.htm
字號(hào):
<html>
<head>
<title>新時(shí)代軟件教程:操作系統(tǒng) 主頁(yè)制作 服務(wù)器 設(shè)計(jì)軟件 網(wǎng)絡(luò)技術(shù) 編程語(yǔ)言 文字編輯</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, table {font-size: 9pt; font-family: 宋體}
a {text-decoration:none}
a:hover {color: red;text-decoration:underline}
.1 {background-color: rgb(245,245,245)}
-->
</style>
</head>
<p align="center"><script src="../../1.js"></script></a>
<p align="center"><big><strong>session寫(xiě)的簡(jiǎn)單計(jì)數(shù)器</strong></big></p>
<div align="right">---摘自互聯(lián)網(wǎng)</div>
<br><%@ page errorPage="errorpage.jsp" %><br>
<br>
<html><br>
<head><br>
<title>UseSession</title><br>
</head><br>
<body><br>
<%<br>
// Try and get the current count from the session<br>
Integer count = (Integer)session.getAttribute("COUNT");<br>
<br>
// If COUNT is not found, create it and add it to the session<br>
if ( count == null ) {<br>
<br>
count = new Integer(1);<br>
session.setAttribute("COUNT", count);<br>
}<br>
else {<br>
<br>
count = new Integer(count.intValue() + 1);<br>
session.setAttribute("COUNT", count);<br>
} <br>
// Get the User's Name from the request<br>
out.println("<b>Hello you have visited this site: "<br>
+ count + " times.</b>");<br>
%><br>
</body><br>
</html>
</table>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -