how to get Input Text field value
-
Hi, I add one text field to get information from customers.
now I get the value of this input filed by javascript but it is null.Html(from inspect element)(i create one text filed)
<input type=”text” id=”yith-wapo-9-0″ name=”yith_wapo[][9-0]” value=”” minlength=”1″ maxlength=”111″ data-price=”0″ data-price-sale=”0″ data-price-type=”fixed” data-price-method=”free” data-first-free-enabled=”” data-first-free-options=”” data-addon-id=”9″ required=”” style=”width: 100%;”>My javascript
console.log(document.getElementById(“yith-wapo-9-0”).value);Error
(index):5 Uncaught TypeError: Cannot read properties of null (reading ‘value’)
at (index):5:53
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to get Input Text field value’ is closed to new replies.