The other big change we’re making in this release is exposing refs to DOM components as the DOM node itself. That means: we looked at what you can do with a ref to a React DOM component and realized that the only useful thing you can do with it is call this.refs.giraffe.getDOMNode() to get the underlying DOM node. Starting with this release, this.refs.giraffe is the actual DOM node. Note that refs to custom (user-defined) components work exactly as before; only the built-in DOM components are affected by this change.
这个不叫元素的属性,这是dom元素下的textnode,应该用innerText去获取,另外用.text获取是不是因为jQuery $.text()写习惯了。
使用ref属性获取Dom元素后,再使用原生javascript获取内容
ref具体使用请看文档 https://facebook.github.io/react/docs/more-about-refs.html
这是文本节点,jquery写多了,和我一样。总是弄混了。