﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-大鸟的学习乐园-文章分类-javascript</title><link>http://www.blogjava.net/dunkbird/category/48738.html</link><description>路漫漫其修远兮，吾将上下而求索</description><language>zh-cn</language><lastBuildDate>Sun, 29 May 2011 11:23:48 GMT</lastBuildDate><pubDate>Sun, 29 May 2011 11:23:48 GMT</pubDate><ttl>60</ttl><item><title>javascript 学习日志2（动态生成方法）</title><link>http://www.blogjava.net/dunkbird/articles/351285.html</link><dc:creator>大鸟</dc:creator><author>大鸟</author><pubDate>Sun, 29 May 2011 10:37:00 GMT</pubDate><guid>http://www.blogjava.net/dunkbird/articles/351285.html</guid><wfw:comment>http://www.blogjava.net/dunkbird/comments/351285.html</wfw:comment><comments>http://www.blogjava.net/dunkbird/articles/351285.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/dunkbird/comments/commentRss/351285.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/dunkbird/services/trackbacks/351285.html</trackback:ping><description><![CDATA[<div><div>function User(properties){</div><div><span style="white-space:pre">	</span>for(var p in properties) {</div><div><span style="white-space:pre">		</span>(function(which){</div><div><span style="white-space:pre">			</span>which["get" + p] = function(){</div><div><span style="white-space:pre">				</span>return properties[p];<span style="white-space:pre">	</span></div><div><span style="white-space:pre">			</span>};</div><div><span style="white-space:pre">			</span>which["set" + p] = function(val){</div><div><span style="white-space:pre">				</span>properties[p] = val;</div><div><span style="white-space:pre">			</span>};</div><div><span style="white-space:pre">		</span>})(this);</div><div><span style="white-space:pre">	</span>}</div><div></div><div>}</div><div></div><div>var user = new User({"name":"tom","age":"444"});</div><div></div><div>alert(user.name);</div><div></div><div>alert(user.getname());</div><div></div><div>user.setage(222);</div><div></div><div>alert(user.getage());</div></div><div></div><img src ="http://www.blogjava.net/dunkbird/aggbug/351285.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/dunkbird/" target="_blank">大鸟</a> 2011-05-29 18:37 <a href="http://www.blogjava.net/dunkbird/articles/351285.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>