I have a text field like this:
<input id="num" type="text" style="width:10px"/>
I am trying to retrieve it from JavaScript as follows:
var numofnodes =parseInt(document.getElementById('num').value,10);
It is giving "", and i tried like this
var numofnodes =document.getElementById('num').value
But still I am getting "".
id="num"attribute? Any errors in the console?