internet explorer - javascript and class class=input-range doesn't work in ie -
i having issue simple javascript not working in ie. code here:
<script> function test(){ var mydivelem = document.getelementbyid("mydiv"); var sizerange= document.getelementbyid("sizeid"); mydivelem.innerhtml = sizerange.value; } </script> <div> <p> <form action="url-link-here" method="post"> <span id="mydiv">100</span> <input class="input-range" id="sizeid" oninput="test()" type="range" name="size" value="100" min="5" max="250" step ="5">
it works fine in other browsers.
use onchange instead of oninput. worked in ie11
function test() { var mydivelem = document.getelementbyid("mydiv"); var sizerange = document.getelementbyid("sizeid"); mydivelem.innerhtml = sizerange.value; }
<form action="url-link-here" method="post"> <span id="mydiv">100</span> <input class="input-range" id="sizeid" oninput="test()" onchange="test()" type="range" name="size" value="100" min="5" max="250" step="5"> </form>
Comments
Post a Comment