首页 > 解决方案 > 如何将输入分配给变量?

问题描述

当我尝试运行此代码时,它显示: index.html?descricao=:14 Uncaught TypeError: Cannot set property 'value' of null at index.html?descricao=:14

java code: var inputValue = document.getElementById("reply").value;

html: <textarea id="reply" name="reply" onKeyPress="enterpressalert(event, this)"></textarea>

标签: javavariablesinputvar

解决方案


推荐阅读