Re: use javascript to change <Td nowrap>



Katie wrote on 15 sep 2006 in comp.lang.javascript:

Hi,

I was wondering is there any way to change the width property of a
table cell <Td id="test"> to no wrap by using
document.getElementById(test).SOMEMETHOD

<script type='text/javascript'>
function toggleIt() {
var myDiv = document.getElementById('myDiv')
myDiv.noWrap = ! myDiv.noWrap
}
</script>

<input type='button' value='Toggle' onclick='toggleIt();'>
<br><br>
<div id='myDiv' style='width:50px;border:black 2pt dotted;'>
This is a wrap to nowrap test
</div>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.


Quantcast