为什么这段代码在 p Tag 中没有任何输出?请解释一下
const inputName = document.getElementById("inputName");
const btnShow = document.getElementById("btnShow");
const pShow = document.getElementById("pShow");
btnShow.addEventListener("click", () => {
const text = inputName.Value;
pShow.textContent = text;
});
console.log(inputName, btnShow, pShow);
Run Code Online (Sandbox Code Playgroud)