s(); function s (){ var mydate=new Date(); var y = mydate.getFullYear(); var m = mydate.getMonth(); var d = mydate.getDate(); var x = mydate.getHours() var f = mydate.getMinutes() var mm = mydate.getSeconds() document.write(y+"-"+(m+1)+"-"+d+" "+" "+x+":"+f+":"+mm); }