dynamical change td width with js
<p>I need to change the width of a td using javascript.  The value of the width will be pulled in and then I need to multiple it to get a percentage.  I just need to know how to write the js so far I have got to here but it is not working</p>

<pre><code>&lt;script language="JavaScript"&gt;
var divWidth = 66*0.4;

document.write("&lt;td width="+divWidth+"&gt;");

document.getElementById("myRow").write("&lt;td width="+divWidth+"&gt;");

&lt;/script&gt;


&lt;table&gt;
&lt;tr&gt;
    &lt;td id="myRow"&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p></p>

<p></p>


 
     
    

