search

Home  >  Q&A  >  body text

Library packaging issues

Base.prototype.css=function(attr,value){

// this.elements[0].style.attr=value;

this.elements[ 0].style[attr] = value;

return this;

}

Question: In the underlined sentence, why does .style[attr] work like this? ? I don’t understand. Can the teacher explain it?

李冲李冲2131 days ago853

reply all(2)I'll reply

  • 李冲

    李冲2019-03-09 22:21:07

    I know the answer to the question

    reply
    0
  • Cancelreply