摘要:
function Person(properties) { for (var item in properties) { //必须放在匿名函数内分离作用域,不然每个p会是最后一项item的值 (function (which) { //记住这个作用域内的值 var p = item; which["Get" + p] = function () { return properties[p]; }; which["Set" + p] = ... 阅读全文
posted @ 2012-06-25 22:53
Bug山Bug海
阅读(138)
评论(0)
推荐(0)
浙公网安备 33010602011771号