javascript 自动转到命名锚记
人气:0
1.自动转到命名记
<script laguage="javascript">
window.location.hash = "#bottom";
</script>
<a name="bottom">底部</a>
2.自动定位到指定高度
<script laguage="javascript">
<!--
//function scrollwin() {
/https://img.qb5200.com/download-x/document.body.scrollTop
var scroll_y = parseInt(1000);
window.scrollBy(0, scroll_y);
//}
//-->
</script>
复制代码 代码如下:
<script laguage="javascript">
window.location.hash = "#bottom";
</script>
<a name="bottom">底部</a>
2.自动定位到指定高度
复制代码 代码如下:
<script laguage="javascript">
<!--
//function scrollwin() {
/https://img.qb5200.com/download-x/document.body.scrollTop
var scroll_y = parseInt(1000);
window.scrollBy(0, scroll_y);
//}
//-->
</script>
加载全部内容