$(document).ready(function(){
iframeSize()
});
$("html").live("click", function( event ){
iframeSize()
});
$("html").live("keypress", function( event ){
iframeSize();
});
// resize dialog and iframe when contents change document height
function iframeSize(){
var iframeHeight = $(document).height();
window.parent.$('#loginLayer').attr('height', iframeHeight);
window.parent.$('#loginDialog').css('height', iframeHeight);
}
这段代码能写得更高效吗?
谢谢!