Home >Web Front-end >HTML Tutorial >Introduction to the execution sequence example between href jump and onclick of html hyperlink a tag_HTML/Xhtml_Webpage Production

Introduction to the execution sequence example between href jump and onclick of html hyperlink a tag_HTML/Xhtml_Webpage Production

WBOY
WBOYOriginal
2016-05-16 16:39:052478browse

The execution relationship between the href jump and onclick of the a tag of the html hyperlink
The href of the a tag of the html is used for jump, but if the onclick event is added, what is the execution order?
As follows:
[code]

If onclick returns false, then a will not jump;
If onclick returns true, then a will jump

Note: Add the return keyword in onclick

This is often used to judge before jumping! !

Statement:
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