如圖片一樣 計算倆個日期之間的時間差
並且更改開始時間或截止時間是下方的陰歷開始跟截止同樣改變,改變成同一天
大神幫幫小弟 最好帶注釋 感謝了
<div class="maincontent">
<h2>在線日期計算</h2>
<script>//顯示當前日期時間
setInterval("jnkc.innerHTML=new Date().toLocaleString()+'星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
</script>
<div id="t1">
<p class="today">今天是</p><label id="jnkc" ></label>
<div class="sj" ><span class="qz">起止</span><span class="jz">截止</span></div>
<form name="reg_testdate" method="post" class="date">
<select name="YYYY" onChange="YYYYDD(this.value)"></select><span>年</span>
<select name="MM" onChange="MMDD(this.value)"> </select><span>月</span>
<select name="DD" ></select><span>日</span>
</form>
<form name="reg_testdate4" method="post" class="date4">
<select name="YYYY4" onChange="YYYYDD4(this.value)"></select><span>年</span>
<select name="MM4" onChange="MMDD4(this.value)"> </select><span>月</span>
<select name="DD4" ></select><span>日</span>
</form>
<form name="reg_testdate1" method="post" class="date1">
<select name="YYYY1" onChange="YYYYDD1(this.value)"></select><span>年</span>
<select name="MM1" onChange="MMDD1(this.value)"> </select><span>月</span>
<select name="DD1" ></select>
</form>
<form name="reg_testdate3" method="post" class="date3">
<select name="YYYY3" onChange="YYYYDD3(this.value)"></select><span>年</span>
<select name="MM3" onChange="MMDD3(this.value)"> </select><span>月</span>
<select name="DD3" ></select>
</form>
<form name="reg_testdate2" id="jg" class="date2">
<input type="text" class="tet" onChange="YYYYDD2(this.value)"/><span>年</span>
<input type="text" class="tet" onChange="MMDD2(this.value)"/><span>月</span>
<input type="text" class="tet"/><span>周</span>
<input type="text" class="tet"/><span>日</span>
<input type="text" class="tet"/><span>小時</span>
<input type="text" class="tet"/><span>分鐘</span>
<input type="text" class="tet"/><span>秒</span>
</form>
</div>
</div>