Изменение размера таблицы с помощью javascript onchange
I have two <TD>'s in a Table. I try to get them resized when I drag a input type "range". So I have added a onChange, like so: <input type="range" name="memberarea" min="64" max="960" VALUE='220' onchange="resize_memeberarea()"> <input type="range" name="mainfield" min="64" max="1216" VALUE='640' onchange="resize_mainfield()"> .. and then I have added a script like this: <script> function resize_memeberarea() { var x = document.getElementById("$_SESSION['memberarea']").value; document.getElementById("memberarea").innerHTML = x; function resize_mainfield() { var y = document.getElementById("$_SESSION['mainfield']").value; document.getElementById("mainfield").innerHTML = y; } } </script> I want the <TD>'s to be resized as I move the slider, in real time. So I use the "onChange". I have the width of the <TD> set to $_SESSION['memberarea'] that contains the value. Can someone please help me to get this solved. Thanks! /Jacob
Что я уже пробовал:
<script> function resize_memeberarea() { var x = document.getElementById("$_SESSION['memberarea']").value; document.getElementById("memberarea").innerHTML = x; function resize_mainfield() { var y = document.getElementById("$_SESSION['mainfield']").value; document.getElementById("mainfield").innerHTML = y; } } </script>