5
오랫동안이 기능이 있었지만 클릭 할 때 높이가 변경되었습니다. 크롬의 마지막 업데이트 이후 Chrome에서 작업이 중단되었습니다. 나는 값 0을 얻는다. 탐험가 나 다른 플랫폼에서는 훌륭하게 작동한다. 어떤 아이디어로 다시 만들 수 있을까요?마지막 Chrome 업데이트 이후 scrollHeight가 작동하지 않습니다.
function calcHeight() {
var the_height = document.getElementById('resize').contentWindow.document.body.scrollHeight;
window.alert(the_height);
document.getElementById('resize').height= the_height;
}
코드에서'* .document.documentElement.scrollHeight' 사용할 수 있습니까? – K3N
예! 감사. 어떻게 내가 이것을 놓쳤는지 모르겠다. – yortem