I have two divs like so
tooooooooooooooooooooo much cont 相关标签: 2条回答 傲寒 2021-01-07 17:15 document.getElementById('parent').scrollWidth scrollWidth is an IE extension that historically was less well supported than offsetWidth. However nowadays all the modern desktop browsers include it. 0 讨论(0) 发布评论: 提交评论 加载中... 梦谈多话 2021-01-07 17:37 Using JQuery, you can do: $('#parent')[0].scrollWidth 0 讨论(0) 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
document.getElementById('parent').scrollWidth
scrollWidth is an IE extension that historically was less well supported than offsetWidth. However nowadays all the modern desktop browsers include it.
Using JQuery, you can do:
$('#parent')[0].scrollWidth