📜  html 获取表单元素 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:12.133000             🧑  作者: Mango

代码示例1
var x = document.getElementById("myForm");
var txt = "";
var i;
for (i = 0; i < x.length; i++) {
  console.info(x.elements[i].value);
}