[英]Convert datetime object into specific string Javascript
I have a date in the format dd.MM.yyyy HH:mm
, for example 31.01.2014 11:24. 我有一个格式为
dd.MM.yyyy HH:mm
的日期,例如31.01.2014 11:24。 How can I obtain, in javascript, the string "/Date(1391160281569)/"? 如何在JavaScript中获取字符串“ / Date(1391160281569)/”?
I took me a while but i got this: 我花了一段时间,但我得到了:
var theStringVersion = "/Date("+$.now()+")/";
Of course, for a real date, i would have to get the timestamp for it. 当然,对于一个真实的日期,我将不得不为其获取时间戳。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.