code052.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" http-equiv="Refresh" content="1"><!-- 1秒刷新一次 -->
<title>简易的电子时钟</title>
<style type="text/css">
#clock
{
width:420px;
height:80px;
background-color:#e0e0e0;
font-size:25px;
font-weight:bold;
border: 5px solid orange;
padding:20px;
}
#week
{
padding-top:15px;
color:#0080ff;
}
</style>
</head>
<body>
<jsp:useBean id="date" class="pack01.code051" scope="application"></jsp:useBean>
<div align="center">
<div id="clock">
<div id="time">
<jsp:getProperty property="dateTime" name="date"/>
</div>
<div id="week">
<jsp:getProperty property="week" name="date"/>
</div>
</div>
</div>
</body>
</html>