void is an operator in JavaScript, the syntax is as follows:
javascript:void(expression)
javascript:void expression
void will calculate the value of the expression, but discard the return value of the expression.
This expression is often used to make a link a dead link:
When this link is clicked, The address jump will not occur, but the onclick function will be executed.
The following method can also achieve the same result
But "#" contains a location information, the default is Return to the top of the web page, so in order to avoid this situation, you can add a return false statement to the onclick statement
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