<script type="text/javascript"> var now = ""; var date = new Date(); //日期对象 now = date.getFullYear()+"年"; now = now + (date.getMonth()+1)+"月"; now = now + date.getDate()+"日"; now = now + date.getHours()+"时"; now = now + date.getMinutes()+"分"; now = now + date.getSeconds()+"秒"; function queryStr(){ var query = document.getElementById("timeQuery"); query.innerHTML = now; query.attributes(Style,""); } </script>