代码 :
复制代码代码如下::
<script type = "text/javaScript">
var format = function (Zeit, Format) {
var t = neues Datum (Uhrzeit);
var tf = function (i) {return (i <10? '0': '') + i};
return format.replace (/yjyy | mm | dd | hh | mm | ss/g, Funktion (a) {
Schalter (a) {
Fall 'Yyyy':
return tf (t.getingfullyear ());
brechen;
Fall 'Mm':
return tf (t.getMonth () + 1);
brechen;
Fall 'Mm':
return tf (t.getminutes ());
brechen;
Fall 'DD':
return tf (t.getDate ());
brechen;
Fall 'HH':
return tf (t.gethours ());
brechen;
Fall 'SS':
return tf (t.getSeconds ());
brechen;
};
});
};
Alert (Format (1396178344662, 'yyyy-mm-dd hh: mm: ss'));
</script>