【发布时间】:2014-09-15 03:19:51
【问题描述】:
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(url,'popUpWindow','height=500, width=800, left=10, top=10, resizable=yes, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes')
}
</script>
<a href="JavaScript:newPopup('http://www.google.ca');">CLICK HERE</a></a> to go to google.
当用户点击网页上的CLICK HERE 时,会出现一个弹出窗口,将您引导至http://www.google.ca 网页。我的问题是如何让点击CLICK HERE时弹出窗口自动滚动到页面底部?
我找到了这段代码:
window.scrollBy(0,50),但它会将网站本身滚动到底部。它不会滚动弹出窗口。
【问题讨论】:
标签: javascript html popup