why does body.scrollHeight automatically increase but not decrease
问题 My iframe.body has a scrollHeight property which I believe is read only I don't understand how it gets set. When I modify the iframe.body.innerHTML with some larger HTML, I notice the iframe.body.scrollHeight increases . Great! When we set $('#previewWindow').height(iframeDocument.body.scrollHeight) this means that the scrollbar is the right height for the new larger content However.... When I modify the iframe.body.innerHTML with some smaller HTML, I notice the iframe.body.scrollHeight