...

View Full Version : rows[] can't run IE8



h2ovn
08-27-2008, 09:51 AM
var oTable = document.getElementById("tbl");
for (var i = 0; i < oTable.rows.length; i++)
{
oTable.rows[i].style.fontWeight = "bold";
}

run with IE7, firefox ok. but run with IE8 errors rows is null

how I can get collection of row objects (rows) in a table with IE8 ? plz help me.


sry my en is poor

rnd me
08-27-2008, 11:39 AM
var oTable = document.getElementById("tbl");
var rows = oTable.getElementsByTagName("tr");
for (var i = 0, mx=rows.length; i < mx; i++)
{
rows[i].style.fontWeight = "bold";
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum