标签:style for ar table js 字符串 return css
var table = objj.getElementsByTagName(‘table‘);
alert(table[i].width);
if(table==null) return;
for(var i=0; i<table.length; i++) {
if(table[i].width>parseInt(objj.style.width))
{
table[i].style.width = objj.style.width;
}
}
注:table[i].width为整形,table[i].style.width为字符串。例:alert(table[i].width)输出300, alert(table[i].style.width)输出‘300px‘
js 控制 table style css,布布扣,bubuko.com
标签:style for ar table js 字符串 return css
原文地址:http://www.cnblogs.com/zhanghaoyong/p/3898692.html