下面是我网站上的一段js代码,效果是:0天8小时29分10秒,小时时间是根据后面的分、秒递减的,现在我想给小时时间改下,如改成4小时,应该怎么改!菜鸟求指教!谢谢!<script language="javascript"><!--function show_student_time(){var LSTR_ndate=new Date();var LSTR_Year=LSTR_ndate.getFullYear();var LSTR_Month=LSTR_ndate.getMonth()+1;var LSTR_Date=LSTR_ndate.getDate();var be_Date=LSTR_ndate.getDate()-1;var span_dt_sj01 = document.getElementById("span_dt_sj01")var span_dt_dt = document.getElementById("span_dt_dt")span_dt_sj01.innerHTML=LSTR_Year+'年'+LSTR_Month+'月'+be_Date+'-'+LSTR_Date window.setTimeout("show_student_time()", 1000); BirthDay=new Date(LSTR_Year,LSTR_Month-1,LSTR_Date+1);//改成你的计时日期 today=new Date(); timeold=(BirthDay.getTime()-today.getTime()); sectimeold=timeold/1000 secondsold=Math.floor(sectimeold); msPerDay=24*60*60*1000 e_daysold=timeold/msPerDay daysold=Math.floor(e_daysold); e_hrsold=(e_daysold-daysold)*24; hrsold=Math.floor(e_hrsold); e_minsold=(e_hrsold-hrsold)*60; minsold=Math.floor((e_hrsold-hrsold)*60); seconds=Math.floor((e_minsold-minsold)*60); span_dt_dt.innerHTML=daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒" ;}show_student_time();//--></script>