-
2019-03-09 22:07:14
- 库的封装问题
- Base.prototype.css=function(attr,value){// this.elements[0].style.attr=value;this.elements[0].style[attr] = value;return this;}问题:下划线那一句中,.style[attr]为什么可以这样?理解不了,老师能解释一下吗?
-
0
1
1140
-
2019-03-09 22:04:55
- 在封装库--连缀【2】中的问题
- Base.prototype.css=function(attr,value){ // this.elements[0].style.attr=value; this.elements[0].style[attr] = value; return this;提问:style['color']这种写法是报错的,为什么传参过来就可以?谢谢老师}
-
0
0
1162