<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
===================================================
iframe高度自适应
<div id="mainbody" class="mainbody" style="margin-left:200px">
<iframe id="mainFrame" name="mainFrame" frameborder="0" scrolling="no" src="<?php echo U('index/welcome')?>" onload="changeFrameHeight()" width="100%">
</iframe>
<script type="text/javascript">
function changeFrameHeight(){
var ifm= document.getElementById("mainFrame");
ifm.height=document.documentElement.clientHeight;
}
/*window.onresize = function(){
alert('123')
changeFrameHeight();
}*/
</script>
网友评论