Home >Web Front-end >H5 Tutorial >textarea到底是使用value还是innerhtml还是innerText来获取输入的内容的?

textarea到底是使用value还是innerhtml还是innerText来获取输入的内容的?

WBOY
WBOYOriginal
2016-06-07 08:44:111578browse

如题,就是看有的地方使用value,有的地方是innerHTML,还有的地方是用innerText,到底那种是对的,如果同时设置了多了,冲突了怎么办?

回复内容:

应该用 value 属性。 form 里的Dom元素(input select checkbox textarea radio)都是value
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn