$(document).ready(function() {
		alert(today());
		
		document.getElementById("serviceTime").value = today();
	});

  

	
	function today(){
	    var today=new Date();
	    var h=today.getFullYear();
	    var m=today.getMonth()+1;
	    var d=today.getDate();
	    var hh=today.getHours();
	    var mm=today.getMinutes();
	    var ss=today.getSeconds();
	    m= m<10?"0"+m:m;      
	    d= d<10?"0"+d:d;
	    hh = hh < 10 ? "0" + hh:hh;
	    mm = mm < 10 ? "0" +  mm:mm;
	    ss = ss < 10 ? "0" + ss:ss;
	    return h+"-"+m+"-"+d+" "+hh+":"+mm+":"+ss;
	}

  

相关文章:

  • 2022-12-23
  • 2021-11-04
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-11
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
相关资源
相似解决方案