<div class="codetitle"> <span><a style="CURSOR: pointer" data="81744" class="copybut" id="copybut81744" onclick="doCopy('code81744')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code81744"> <br><script type="text/javascript"> <BR>function initArray(){ <BR>this.length=initArray.arguments.length; <BR>for(var i=0;i<this.length;i++){ <BR>this[i]=initArray.arguments[i]; <BR>} <BR>} <BR> var strA=""; <BR> function TimeList() <BR> { <BR> var i=0; <BR> var str=new Array("零","壹","贰","叁","肆","伍","陆","妻","捌","玖"); <BR> var str2=new Array("一","二","三","四","五","六","七","八","九","十"); <BR> var str3=new Array("星期天","星期一","星期二","星期三","星期四","星期五","星期六"); <BR> var time=new Date(); <BR> var year=new initArray(time.getFullYear().toString().split("")[0],time.getFullYear().toString().split("")[1],time.getFullYear().toString().split("")[2],time.getFullYear().toString().split("")[3]); <BR> //var year=eval(time.getFullYear().toString()); <BR> var month; <BR> if(time.getMonth().toString().length>1) <BR> { <BR> month=new initArray(time.getMonth().toString().split("")[0],time.getMonth().toString().split("")[1]); <BR> } <BR> else <BR> { <BR> month=new initArray(time.getMonth().toString().split("")[0]); <BR> } <BR> <BR> <BR> <BR> var len=year.length; <BR> for(i=0;i<4;i++) //年 <BR> { <BR> var k=parseInt(year[i]); <BR> <BR> strA+=str[k]; <BR> } <BR> strA+="年"; <BR> var j=0; <BR> var strB=""; <BR> if(month.length>1) <BR> { <BR> strB+=str2[9]; <BR> strB+=str2[parseInt(time.getMonth().toString().split("")[1])]; <BR> } <BR> else <BR> { <BR> strB+=str2[parseInt(time.getMonth().toString().split("")[0])]; <BR> } <BR> strA+=strB; <BR> strA+="月"; <BR> var strD=""; <BR> if(time.getDate().toString().length>1) <BR> { <BR> if(parseInt(time.getDate().toString().split("")[0])>1) <BR> { <BR> strD+=str2[parseInt(time.getDate().toString().split("")[0])-1]; <BR> strD+=str2[9]; <BR> if(parseInt(time.getDate().toString().split("")[1])>0) <BR> { <BR> strD+=str2[parseInt(time.getDate().toString().split("")[1])-1]; <BR> } <BR> else <BR> { <BR> strD+=""; <BR> } <BR> } <BR> else <BR> { <BR> if(parseInt(time.getDate().toString().split("")[1])==0) <BR> { <BR> strD+="初"; <BR> strD+=str2[9]; <BR> } <BR> else <BR> { <BR> strD+=str2[9]; <BR> strD+=str2[parseInt(time.getDate().toString().split("")[1])-1]; <BR> } <BR> <BR> } <BR> } <BR> else <BR> { <BR> strD+="初"; <BR> strD+=str2[parseInt(time.getDate().toString().split("")[0])-1]; <BR> } <BR> strA+=strD; <BR> strA+=" "; <BR> <BR> var sta=time.getDay(); <BR> strA+=str3[sta]; <BR> document.getElementById("Text1").value=strA; <BR> document.getElementById("TextBox1").innerText=strA; <BR> document.all.Label1.innerText=strA; <BR> document.form1.TextBox2.innerText=strA; <BR> <BR> } <BR></script> <br> </div>