这里的this指代的是被添加原形的类的实例,和4中类定义有些相似,没有什么太特别的地方。
6、结合2&4,说一个比较迷惑的this关键字使用:
function jsclass()
{
this.m_text = 'division element';
this.m_element = document.createelement('div');
this.m_element.innerhtml = this.m_text;
this.m_element.attachevent('onclick', this.tostring);
}
jsclass.prototype.render = function()
{
document.body.appendchild(this.m_element);
} 
jsclass.prototype.tostring = function()
{
alert(this.m_text);
};
var jc = new jsclass();
jc.render();
jc.tostring();