js code
const inputEl = document.getElementById("input-el")
for this code console is showing error about document not defined, can anyone help how to solve this?
html code:
<input type="text" id="input-el">
ReferenceError: document is not defined at Object. (c:\Users\User\Desktop\Counter js\ChromeExtension\index.js:2:17) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47
Via Active questions tagged javascript - Stack Overflow https://ift.tt/yKeT96C
Comments
Post a Comment