Hi I whana take value with javascript from input type number field. I whana take value always then new number is select, bescause in other field I whana calculate how much it gone cost.
<td>
<input type="number" id="kiek1000classico" name="kiek1000classico" min="1" max="99">
</td>
<td>
<script>
var kiek = document.getElementById("kiek1000classico").value;
</script>
</td>
Now it always return empty string, I just need know how take number every time then it changed without refresh page. I am using wordpress
try this
you have to wire the
onchange
event of the text box.For Pure Javascript
With Jquery it will be more simple
Try This one
Better to use jquery in wordpress
This is was for “change” event, you can also use “blur” event in the same manner.