Js获取当前时间
<script language="javascript" type="text/javascript"> //js获取日期 function time() { var now= new Date(); var year=now.getFullYear(); var month=now.getMonth(); var date=now.getDate(); //写入相应id document.getElementById("res_date").value=year+"-"+(month+1)+"-"+date; } </script>