var now = new Date(); now.getYear()+'-'+(now.getMonth()+1)+'-'+now.getDate()+' '+now.getHours()+':'+now.getMinutes()+":"+now.getSeconds()
var now = new Date(); var time = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate() + " " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- var now = new Date(); var year = now.getFullYear(); var month = now.getMonth() + 1; (month < 10) ? (month = '0'+month) : month; var date = now.getDate(); var Temp = year + '-' + month + '-' + date + ' ' + Date().split(" ")[3] ; alert(Temp); //--> </SCRIPT> </HEAD> <BODY>
now.getYear()+'-'+(now.getMonth()+1)+'-'+now.getDate()+' '+now.getHours()+':'+now.getMinutes()+":"+now.getSeconds()
var now = new Date();
var time = now.getFullYear() + "-" +
(now.getMonth() + 1) + "-" +
now.getDate() + " " +
now.getHours() + ":" +
now.getMinutes() + ":" +
now.getSeconds();
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1;
(month < 10) ? (month = '0'+month) : month;
var date = now.getDate();
var Temp = year + '-' + month + '-' + date + ' ' + Date().split(" ")[3] ;
alert(Temp);
//-->
</SCRIPT>
</HEAD> <BODY>
</BODY>
</HTML>