Posted in Javascript onAugust 29, 2009
//日期类 function myDate(time){ var d = new Date(time); this.y=d.getFullYear(); this.m=d.getMonth(); this.d=d.getDate(); this.h=d.getHours(); this.m=d.getMinutes(); this.s=d.getSeconds(); } //创建DOM function createDOM(e,p){ var el=document.createElement(e); if(!p) p=document.body; p.appendChild(el); return el; } //为dom添加事件监听 function addEvent(el,event,fn){ el.addEventListener?el.addEventListener(event,fn,false):el.attachEvent("on"+event,fn); }
javascript 简练的几个函数
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@