摘要:
JavaScript没有原生的继承机制,但是可以模拟实现。其中的关键是使用Function.apply()或Function.call()。自己实现了这种模拟过程,在这里记一笔。var Utility = { trace: function(s){ WScript.Echo(s); }, getDateTime: function(){ var d = new Date(); var s = new String(); s = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + 阅读全文
posted @ 2011-04-05 21:20
lanyuliuyun
阅读(679)
评论(1)
推荐(1)

浙公网安备 33010602011771号