<script language="JavaScript" type="text/javascript"> //取得當(dāng)前時間 function getNowTime(){ //取得當(dāng)前時間 var now= new Date(); var year=now.getYear(); var month=now.getMonth()+1; var day=now.getDate(); var hour=now.getHours(); var minute=now.getMinutes(); var second=now.getSeconds(); var nowdate=year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second; document.form.action="test2.jsp?param="+nowdate;//把獲取的時間傳給另一個頁面,在另一個頁面顯示 document.form.submit(); } </script>
|