我创建了一个具有以下属性的 iframe。
<iframe id='modalIframeId' width='100%' height='100%' name='modalIframeId' marginWidth='0' marginHeight='0' frameBorder='0' scrolling='auto' scrolling='yes' title='Dialog Title'>
当我用鼠标滚轮从上到下滚动时,内容正常。但滚动条没有相应移动。这与 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>
关于javascript - iframe滚动条不动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5449405/