【发布时间】:2015-11-27 03:04:44
【问题描述】:
我已经编写了这段代码来计算点击时现有元素的高度和宽度。这是正确的吗?
$('#submit').click(function(){
var width = ddbar.clientWidth;
var height = ddbar.clientHeight;
alert(width);
alert(height);
});
【问题讨论】:
-
这是正确的吗?你试过了吗? ddbar 是在哪里定义的?
标签: javascript jquery html