我有一个包含iframe页面(iframe.aspx)的父页面(default.aspx)... jQuery动画滚动在iframe.aspx中完美工作,而不是在父页面中工作(默认。 ASPX)。iframe中动画滚动不工作
iframe.aspx页:
<input type="button" onclick="scollWin();" value="Scroll up" />
<div id="scrollToHere">
Scroll to here
</div>
<script type="javascript">
function scrollWin(){
$('html,body').animate({
scrollTop: $("#scrollToHere").offset().top
}, 2000);
}
</script>
工作:当我按一下按钮,滚动窗口工作顺利进行,并转到div
。
父页面(Default.aspx的):
<iframe id="iframebody" runat="server" src="iframe.aspx" style="width:900px;height:600px"></iframe>
当我运行Default.aspx页,然后点击按钮,滚动不工作。
你能告诉我如何访问父滚动窗口?
@sagivo - >当我点击,父页(Default.aspx的)滚动不工作,, – Zeeju 2012-07-31 11:03:36
Sagivo按钮 - > FRD我没有得到任何错误,我的概率向下滚动不起作用,,,该功能在iframe.aspx页面中工作,不在default.aspx中请参考此[链接](http://blog.freelancer-id.com/2009/03/26/scroll-window - 滑稽的jquery /) – Zeeju 2012-07-31 11:09:24