问题描述
如果我有几个数字时钟的js<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><title>NewDocument</title><metaname="Generator"content="EditPlus"><metaname="Author"content=""><metaname="Keywords"content=""><metaname="Description"content=""></head><body><spanid="datetime">time</span><script>functionsetTime(){varday="";varmonth="";varampm="";varampmhour="";varmyweekday="";varyear="";varmyHours="";varmyMinutes="";varmySeconds="";mydate=newDate();myweekday=mydate.getDay();mymonth=parseInt(mydate.getMonth()+1)<10?"0"+(mydate.getMonth()+1):mydate.getMonth()+1;myday=mydate.getDate();myyear=mydate.getYear();myHours=mydate.getHours();myMinutes=mydate.getMinutes();mySeconds=parseInt(mydate.getSeconds())<10?"0"+mydate.getSeconds():mydate.getSeconds();year=(myyear>200)?myyear:1900+myyear;if(myweekday==0)weekday="星期日";elseif(myweekday==1)weekday="星期一";elseif(myweekday==2)weekday="星期二";elseif(myweekday==3)weekday="星期三";elseif(myweekday==4)weekday="星期四";elseif(myweekday==5)weekday="星期五";elseif(myweekday==6)weekday="星期六";datetime.innerText=year+"年"+mymonth+"月"+myday+"日"+myHours+":"+myMinutes+":"+mySeconds+""+weekday;setTimeout("setTime()",1000);}setTime();</script></body></html>
如果要是用tapestry5我怎么调用这个js,让他在我的xxx.tml里面显示出来,应该怎么写这个.tml膜板文件。谢谢了,谁会告诉我下
解决方案
解决方案二:
在线等.......
解决方案三:
难道没人用过吗...