这里HTML是我输入JS显示,而不是输入值
<input type="text" class="ChampionInput" list="champions" name="champion[]"`placeholder="Champion" required>
这里的就是我的js
document.forms["first_form_champions"].oninput = function(e) {
var champion = this["champion[]"];
console.log(champion);
};
我想在的console.log显示(冠军)值输入
您正在引用该元素,因此您在登录时获取该元素。 – epascarello