Iframe滚动条不移动
问题描述:
我已经创建了具有以下属性的Iframe。Iframe滚动条不移动
<iframe id='modalIframeId' width='100%' height='100%' name='modalIframeId' marginWidth='0' marginHeight='0' frameBorder='0' scrolling='auto' scrolling='yes' title='Dialog Title'>
当我滚动从上到下鼠标滚轮的内容会fine.but滚动条不动accordingly.This是相同的情况下与IE8和Firefox。如何,我可以解决这个问题?
答
我可以看到你的100%宽度和高度后,你想让整个页面成为一个iframe。
你可以更好地使用你的<frame>
和<frameset>
,但是使用ajax或php是最好的。
<frameset cols="100%">
<frame src="document.html">
</frameset>
<?php include 'document.html'; ?>
<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<script>
$.get("document.html", function(data){
document.write(data)
});
</script>