iframe父页面获取子页面高度

var self = this
reinitIframe = function () {
var hotel = $("#test")
var height = hotel.contents().find(“body”).height()
self.height = height
console.log(height)
}
window.setInterval(“reinitIframe()”, 200);

你可能感兴趣的:(web前端)