免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年5月22日 星期五

html element's innerText or textContent?


//=== https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent

"""...
Differences from innerText

Internet Explorer introduced element.innerText. The intention is similar but with the following differences:

While textContent gets the content of all elements, including script> and style> elements, the IE-specific property innerText does not.
innerText is aware of style and will not return the text of hidden elements, whereas textContent will.
As innerText is aware of CSS styling, it will trigger a reflow, whereas textContent will not.


..."""



//=== http://stackoverflow.com/questions/24427621/innertext-vs-innerhtml-vs-label-vs-text-vs-textcontent-vs-outertext
text or innerText or jQuery.text()

http://www.w3schools.com/jsref/prop_option_text.asp
The text property sets or returns the text of an "option" element.


沒有留言:

張貼留言