dreamweaver插入时间问题

2025-03-21 04:33:49
推荐回答(2个)
回答1:

想也不会用那么长的代码吧?执行一下操作 打开一张网页,点到要插入的位置,然后点“插入” 点“日期”
ok如果不行你试试新建一张网页转“设计”视图再插一下试试。

回答2:

时间:
function Year_Month(){
var now = new Date();
var mm = now.getMonth()+1;
return(mm ); }

function thisYear(){
var now = new Date();
var yy = now.getYear();
return(yy ); }

function Date_of_Today(){
var now = new Date();
return(now.getDate() ); }

function CurentTime(){
var now = new Date();
var hh = now.getHours();
var mm = now.getMinutes();
var ss = now.getTime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock); }

function refreshCalendarClock(){
document.all.calendarClock1.innerHTML = Year_Month();
document.all.calendarClock2.innerHTML = Date_of_Today();
document.all.calendarClock3.innerHTML =thisYear();
document.all.calendarClock4.innerHTML = CurentTime(); }
document.write('年 ');
document.write('月 ');
document.write('日 ');
document.write('');
setInterval('refreshCalendarClock()',1000);


用JS脚本就好了。