私はこのJqueryを初めて使用しますが、外部Webページをホストしているiframeでiframeのscrollheightとscrollwidthを見つけるのに問題があります。次のコードを試しましたが、機能せず、たくさん検索しました。
$.fn.hasVerticalScrollbar = function () {
// This will return true, when the div has vertical scrollbar
return $frame[0].document.documentElement.offsetHeight() > this.height();
}
$.fn.hasHorizontalScrollbar = function () {
// This will return true, when the div has horizontal scrollbar
return $frame[0].document.documentElement.offsetWidth() > this.width();
}
助けてください。