Hello. I make a slider to change the size of the SVG. Does not work in IE11 and FireFox. Can you please tell me how to fix the code?
function sizePic() { var size = document.getElementById("size").value; var img = document.querySelector('svg'); img.style.width = size; } <html> <body> <section> <input type="range" min="50" max="760" id="size" onchange="sizePic()" value="760"> <div> <svg width="200" height="200" style="width: 100%; height: 100%;" viewBox="0 0 200 200"> <g> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> </g> </svg> </div> </section> </body> </html>