Home > Web Front-end > HTML Tutorial > The difference between html empty link href='#' and href='javascript:void(0)'_HTML/Xhtml_Webpage Production

The difference between html empty link href='#' and href='javascript:void(0)'_HTML/Xhtml_Webpage Production

WBOY
Release: 2016-05-16 16:41:54
Original
1239 people have browsed it

#Contains a location information
The default anchor is #top, which is the top of the web page
And javascript:void(0) only represents a dead link
This is why sometimes the page is very long and the browsing link is obvious Yes # but jumps to the top of the page
But javascript:void(0) is not the case
so it is best to use void(0) when calling the script
You can use the following example to test it:
Code



Tip: You can modify part of the code before running
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template