当前位置: 代码迷 >> JavaScript >> 请解释一下这段什么意思?解决方法
  详细解决方案

请解释一下这段什么意思?解决方法

热度:328   发布时间:2012-02-06 15:52:45.0
请解释一下这段什么意思?
this.config={
                                blank : '┣━ ',
              line : '┣━ '
                }
                for(i   in   this.config){
                        var   tem=this.config[i];
                        this.config[i]=new   Image();
                        this.config[i].txt=tem;}

this.config是什么写法,是结构体吗?


------解决方案--------------------
是包含两个属性的对象实例。
相当于this.config = new Object();
this.config.blank= "┣━ ";
this.config.line= "┣━ ";

this.config 本身也是某类(js function)的属性.
  相关解决方案