通过href简单实现点击a链接跳到页面中指定的地方_HTML/Xhtml_网页制作

WBOY
Release: 2016-05-16 16:39:21
Original
2036 people have browsed it

在页面中点击a标签后,要使其跳到页面里面相应的地方,方法很简单,就是在a标签里面href中的内容和你要跳到这个区域的id同名即可,例如:

复制代码
代码如下:

点我看看

我是该区域的相应内容



若跳到其它页面相应的地方,只需在href中#jump的前面加上链接地址即可,即: 点我看看

这样就可以了,是不是很简单呢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!