React小知識點整理

1 獲取div等標籤內部文本信息:假設渲染出的代碼以下web render(){ return( <div ref="inp" onClick={this.handleClick.bind(this)} >test</div> ) } 則獲取這個div內部的文本信息則爲:svg handleClick(){ let val = this.refs.inp.i
相關文章
相關標籤/搜索