<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>JSP Test</title>
<script LANGUAGE="JavaScript">
<!--
function showTime()
{
var today = new Date();
var hour = today.getHours();
var minute = today.getMinutes();
var second = today.getSeconds();
if(second<=9)
second='0'+second;
if(minute<=9)
minute='0'+minute;
if(hour<=9)
hour='0'+hour;
var mytime = hour+'시 '+minute+'분 '+second+'초';
if(document.layers)
document.layers.liveclock.document.write(mytime)
else if (document.all)
liveclock.innerText=mytime
}
setInterval("showTime()",1000);
</script>
</head>
<body>
<span id=liveclock style="LEFT: 140px; POSITION: absolute; TOP: 30px width=40px "></span>
</body>
</html>
result)
댓글 없음:
댓글 쓰기