10 2013 档案

摘要:Js中获取时间戳可用var dayMiliseconds = parseInt(new Date().valueOf());Js的时间戳单位为毫秒(1s = 1000 ms),下面是一个将制定的格式转化成UTC时间的函数。//format the date string from webservice to UTC time;function toUTCtime(dateStr) { //Date(1381243615503+0530),1381243615503,(1381243615503+0800) dateStr += ""; var utcPrefix... 阅读全文
posted @ 2013-10-10 16:51 冰深 阅读(9466) 评论(0) 推荐(0)
摘要:动态创建对象并绑定属性: var instantiate = function (Type, args) { var Constructor = function () { }; Constructor.prototype = Type.prototype; var obj = new Constructor(); Type.apply(obj, args); return obj; }; ... 阅读全文
posted @ 2013-10-10 11:00 冰深 阅读(378) 评论(0) 推荐(0)