正文

JavaScript 获取 input 元素的 value 值的简单方法:在 HTML 中通过 input 元素的 id 或 name 属性引用,使用 document.getElementById() 或 document.getElementsByName() 函数。例如:document.getElementById('inputId').value 或