I'm making a simple input slider in pure javascript (no jQuery). It works perfectly except for one little flaw: I need to call it in the html as
<div id="test0" data-options="A;B;C;D;E" class="myslider"></div>
instead of the more natural
<input type="hidden" class="myslider" data-options="A;B;C;D;E" id="test0">
The reason for that is that I depend on document.getElementById(name).innerHTML=... to add the necessary markup to it. So my question is: what can we do to replace, append, modify, replace... html text around an <input>? The innerHTML seems not to work, and I fail to find an alternative.
var n = parseInt(value); return n == null ...For what value ofvaluewillparseInt(value) == nullbe true? The way I read ECMA-262, parseInt only returns either an integer orNaN.