Pure JavaScript function similar to jQuery.offset()?
问题 In a small iframe-application at the Russian social network Ok.ru I use the following call to resize the iframe: <div id="fb-root"></div> <script src="http://api.odnoklassniki.ru/js/fapi.js" type="text/javascript"></script> <script type="text/javascript"> FAPI.init("http://api.odnoklassniki.ru/", "XXX_YYY", function() { alert("clientHeight " + document.getElementById("fb-root").clientHeight); alert("offsetHeight " + document.getElementById("fb-root").offsetHeight); FAPI.UI.setWindowSize(720,