
September 6th, 2002, 02:03 AM
|
|
Contributing User
|
|
Join Date: Jun 2002
Posts: 62
Time spent in forums: 12 m 9 sec
Reputation Power: 7
|
|
|
Table problem
I am wondering how do you run through every single tables in a form and set their 'style' properties to "" / or something else
I know of the common
for (var i = 0; i < form.elements.length; i++) {
if (form.elements[i].tagName == "TABLE")
form.elements[i].style = "BORDER-RIGHT:1px dotted #BFBFBF; BORDER-TOP:1px dotted #BFBFBF; BORDER-LEFT:1p
x dotted #BFBFBF; BORDER-BOTTOM:1px dotted #BFBFBF;"
}
.......another statement would be to set form.elements[i].style = ""
....but is this appropriate? Can you set a style value if initially a table does not have any style declared for it. More importantly, is it correct to refer tagName to 'TABLE' (I know you can do that for TD and TR)
__________________
Beginner
|