如何使页面加载到锚标记? [英] How to make the page load to an anchor tag?

查看:62
本文介绍了如何使页面加载到锚标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当网页加载时,我如何或有可能做到这一点,它首先向您显示的是页面的一部分,您希望该人首先看到锚点标签.

how could I, or is it possible, to make it so when the webpage loads, the first thing it shows you is the part of the page, where the anchor tag is you want the person to first see.

有可能吗?

感谢所有的帮助.

推荐答案

像这样的简单事情就可以做到

Something simple like this would do it

<body onload=' location.href="#myanchor" '>
<a id='myanchor' href='#'>anchor text</a>

这篇关于如何使页面加载到锚标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆