是否有任何方法来获取可调整大小的div的宽度和高度,同时调整大小我尝试以下代码,但它导致在警报框中未定义我使用jQuery可调整大小
$("#msc_div").resizable({
start: function() {
var offset = $(this).offset();
alert(offset.height);
alert(offset.width);
}
});
Run Code Online (Sandbox Code Playgroud)
$("#msc_div").resizable({
start: function() {
var t = $(this);
alert( t.height() );
alert( t.width() );
}
});
Run Code Online (Sandbox Code Playgroud)
看到: