<script type="text/javascript">
function iframeHeight(id) {
var windowWidth = $(window).innerWidth();
var windowHeight = $(window).innerHeight();
if (windowWidth >= 786) {
$('#'+id).css('height',windowHeight-50-5-51);
} else {
$('#'+id).css('height',windowHeight-50-50-5-51);
}
}
iframeHeight('menuFrame');
$(window).resize(function() {
iframeHeight('menuFrame');
});
</script>
- Prev: JavaScript 滚动加载
- Next: Sublime Text 主题分享及配置