js如何获取html中输入框中的内容?_js获取htmltext-2023年9月22日 · 方法1: var value = document.getElementById ("textId").value //textId为文的id,此时inputValue为输入框的值. 方法2:var value = document.getElementsByClassName 更多内容请查看https://blog.csdn.net/qq_23689053/article/details/79364180