<div id="test"><%=data %></div> 在以上div中"data"是变量,id 为"test"的div没有指定 [宽度] 也就是变量"data"的字符有多少div就会被撑多宽, 我想用javascript计算出div的宽度 查看完整描述