运行代码
(Shift+Enter)
HTML教程
显示 div 元素的尺寸
innerWidth() - 返回元素的宽度 (包含内边距)。
innerHeight() - 返回元素的高度 (包含内边距)。
运行结果