<html>
<title>NowTime</title>
<body>
<SPAN style="FONT-SIZE: 9pt">
<SCRIPT language=JavaScript>
today=new Date();
function initArray()
{
this.length=initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i + 1] = initArray.arguments[i]
}
var d = new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write("<font color=#076fb7 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth() + 1,"月",
today.getDate(),"日",
d[today.getDay() + 1],
"</font>" );
</SCRIPT><SCRIPT language=JavaScript>
function tick()
{
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var intMilSeconds, milSenconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
intMilSeconds = today.getMilliseconds(); <!--
if (intHours == 0) {
hours = "12:";
xfile = "AM";
} else if (intHours < 12) {
hours = intHours+":";
xfile = "AM";
} else if (intHours == 12) {
hours = "12:";
xfile = "AM";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "PM";
}//--> xfile = "";
if (intHours < 10) {
hours = "0" + intHours + ":";
} else {
hours = intHours + ":";
} if (intMinutes < 10) {
minutes = "0" + intMinutes + ":";
} else {
minutes = intMinutes + ":";
} if (intSeconds < 10) {
seconds = "0" + intSeconds + ".";
} else {
seconds = intSeconds + ".";
} if (intMilSeconds > 100) {
milSenconds = intMilSeconds;
} else if (intMilSeconds > 10) {
milSenconds = "0" + intMilSeconds;
} else {
milSenconds = "00" + intMilSeconds;
} timeString = hours + minutes + seconds + milSenconds;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 1000);
}
window.onload = tick;
</SCRIPT>
<DIV id=Clock style="FONT-SIZE: 12px; COLOR: red" align=center></DIV>
</body>
</html>
<title>NowTime</title>
<body>
<SPAN style="FONT-SIZE: 9pt">
<SCRIPT language=JavaScript>
today=new Date();
function initArray()
{
this.length=initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i + 1] = initArray.arguments[i]
}
var d = new initArray(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六");
document.write("<font color=#076fb7 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"年",
today.getMonth() + 1,"月",
today.getDate(),"日",
d[today.getDay() + 1],
"</font>" );
</SCRIPT><SCRIPT language=JavaScript>
function tick()
{
var hours, minutes, seconds, xfile;
var intHours, intMinutes, intSeconds;
var intMilSeconds, milSenconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
intMilSeconds = today.getMilliseconds(); <!--
if (intHours == 0) {
hours = "12:";
xfile = "AM";
} else if (intHours < 12) {
hours = intHours+":";
xfile = "AM";
} else if (intHours == 12) {
hours = "12:";
xfile = "AM";
} else {
intHours = intHours - 12
hours = intHours + ":";
xfile = "PM";
}//--> xfile = "";
if (intHours < 10) {
hours = "0" + intHours + ":";
} else {
hours = intHours + ":";
} if (intMinutes < 10) {
minutes = "0" + intMinutes + ":";
} else {
minutes = intMinutes + ":";
} if (intSeconds < 10) {
seconds = "0" + intSeconds + ".";
} else {
seconds = intSeconds + ".";
} if (intMilSeconds > 100) {
milSenconds = intMilSeconds;
} else if (intMilSeconds > 10) {
milSenconds = "0" + intMilSeconds;
} else {
milSenconds = "00" + intMilSeconds;
} timeString = hours + minutes + seconds + milSenconds;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 1000);
}
window.onload = tick;
</SCRIPT>
<DIV id=Clock style="FONT-SIZE: 12px; COLOR: red" align=center></DIV>
</body>
</html>
解决方案 »
- ICSharpCode.SharpZipLib.dll 该压缩组件 可以将几个txt文件压缩为 一个zip 文件吗?
- 有用过 Webb.WAVE.Controls.Upload2 这个上传组件的吗?
- 关于string转换成ValidationDataType的方法
- 请教一个搜索问题
- asp.net 如何弹出选择文件夹的窗口?
- 调式问题
- (100分)关于IIS不能启动
- 怎么在MVC4中使用水晶报表?
- csdn论坛实现的一个疑惑!
- 微软专家在吗,其他(她)人遇到过这样的问题吗?
- 请问,如何去掉calendar里的othermothday呢?我只想显示当月的日期---
- 问一个发布的问题---?请你出手相助
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="1000"> </HEAD>
<head>
<script language="javascript">
function showtime()
{
time=new Date();
h=time.getHours();
m=time.getMinutes();
s=time.getSeconds();
timespan.innerText=h+":"+m+":"+s;
setTimeout("showtime()",1000);
}
</script>
</head>
<body onload="showtime()">
<div id="timespan"></div>
</body>
</html>