use javascript to change <Td nowrap>

K

Katie

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

Thanks for your time and help
:)
 
E

Evertjan.

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top