<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>this[i]=initArray.引数[i ]; <br>} <br>} <br> var strA=""; <br> 関数 TimeList() <br> { <br> var <br> var str=new Array( "ゼロ" ,"一","二","三","四","五","鲁","妻","八","九"); var str2=new Array( "一" 、"二"、"三"、"四"、"五"、"六"、"七"、"八"、"九"、"十"); 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.getFull Year().toString().split("")[3]); <br> //var year=eval(time.getFull Year().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> var len=year.length; for(i=0;i { <br> var k=parseInt(年[i]); <br> <br> strA =str[k] } <br> strA = "年"; > var j=0; <br> var strB=""; <br> if(month.length>1) <br> { <br> strB =str2[9]; .getMonth ().toString().split("")[1])]; <br> } <br> else <br> { <br> strB =str2[parseInt(time.getMonth().toString() .split ("")[0])]; <br> } <br> strA =strB; <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]; ) .toString().split("")[1])>0) <br> { <br> strD =str2[parseInt(time.getDate().toString().split("")[1] ) -1]; } <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]; > else <br> { <br> strD =str2[9]; <br> strD =str2[parseInt(time.getDate().toString().split("")[1])-1]; > } <br> <br> } <br> } <br> else <br> { <br> strD = "Initial"; <br> strD =str2[parseInt(time.getDate().toString().split) ( "")[0])-1]; <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.form1.TextBox2.innerText=strA; <br> <br> } <br></script></this.length> </div>