1、如何在表格里实时显示当前时间?<script>
function showtime(){
document.all.currtime.innerHTML=new Date().toLocaleString();
setTimeout("showtime()",1000)
}
window.onload=showtime
</script>
<table><tr><td id=currtime> </td></tr></table>2、如何在我需要的地方(如CSDN上的一样)实现跑马灯效果?
<marquee>如何在我需要的地方(如CSDN上的一样)实现跑马灯效果?</marquee>
function showtime(){
document.all.currtime.innerHTML=new Date().toLocaleString();
setTimeout("showtime()",1000)
}
window.onload=showtime
</script>
<table><tr><td id=currtime> </td></tr></table>2、如何在我需要的地方(如CSDN上的一样)实现跑马灯效果?
<marquee>如何在我需要的地方(如CSDN上的一样)实现跑马灯效果?</marquee>
function timer()
{
now = new Date();
h = (now.getHours() > 9) ? now.getHours() : "0" + now.getHours();
m = (now.getMinutes() > 9) ? now.getMinutes() : "0" + now.getMinutes();
s = (now.getSeconds() > 9) ? now.getSeconds() : "0" + now.getSeconds();
clock.value =""+h+":"+m+":"+s+"";
setTimeout( 'timer()',1000);
} timer();
// --></script>我看看一些基础的书.
<head>
<title>新增集团成员</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">function GetTimeTest(){
var d, s, t;
var MinMilli = 1000 * 60;
var HrMilli = MinMilli * 60;
var DyMilli = HrMilli * 24;
d = new Date();
var h = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
s = h +":" + m +":" + s;
document.all.aa.innerText = s;
}
</script>
</head>
<body bgcolor="#F3F7FB" text="#000000" onload="GetTimeTest()">
<table><tr><td id="aa">
</td></tr></table>
</body>
</html>2.<marquee> 就可以实现跑马灯效果。</marquee>