There are many ways to do nothing after clicking a link, but it is not conducive to the user experience. javascript: void (0) can effectively solve this problem during page creation, if you want to do nothing after clicking a link or respond to the click to complete other tasks, you can set its property href = "#". However, this may cause a problem, when a page h
"#" Contains a location informationThe default anchor is # top, that is, the top of the web page.Javascript: void (0) only indicates a dead link.
This is why sometimes a long page browsing link is clearly # But the page jumps to the top, while javascript: void (0) is not.The
In Javascript, void is an operator that specifies to calculate an expression but does not return a value.The format of the void operator is as follows:1. javascript: void (expression)2. javascript:
Code , So I removed the #, and the remaining href = "". If this happens, the page will be refreshed again after loading.
Finally, we can see other people's code and get the solution. The meaning of void (0) in javascript:
In JavaScript, void is an operator that specifies to
When you do a page, if you want to do nothing after clicking a link, or respond to the click to complete other tasks, you can set its property href = "#", however, in this case, when a page has a scroll bar, clicking it will return to the top of the page, and the user experience is poor.There are currently several solutions:1) do not do anything after clicking the linkCopy codeThe Code is as follows: 2) click the link to respond to user-defined click eventsCopy codeThe Code is as follows: Note:1
I recently read several posts about the Note: The following code is not fully tested, but the possible situation of each method is basically described.
When you do a page, if you want to do nothing after clicking a link, or respond to the click to complete other tasks, you can set its property href = "#", however, in this case, when a page has a scroll bar, clicking it will return to the top of the page, and the user experience is poor.
There are currently several solutions:1) do not do anything
meaning of void (0) in JavaScriptOverviewThe void operator executes the statement passed to it, and then returns undefined. Grammarvoid expressionThe void operator is usually used only to get The original value of the undefined, usually with void (
The specific meaning of void (0) in JavaScript explains that void is an operator in JavaScript, which specifies to calculate an expression but does not return a value.
The format of the void operator is as follows:
1.
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.The format of the void operator is as follows:1. javascript: void (expression)2. javascript:
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
The format of the void operator is as follows:1. javascript: void (expression)2. javascript:
1 Because the href = "#" element will automatically jump the page to the top, so the page will be beating and there is no partial refresh experience.2. Remove #. The remaining href = "" will not work either. This will refresh the page after loading.3,
The meaning of void (0) in javascript:In JavaScript, void is an op
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value. The format of the void operator is as follows: 1. javascript: void (expression) 2. javascript:
As title, javascript:; does not work either. The following results are obtained after the query:In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
Javascript: void (expression)Javas
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value. The format of the void operator is as follows: 1. javascript: void (expression) 2. javascript:
When you do the page, if you want to do nothing after clicking a link or respond to the click to complete other tasks, we can use javascript: void (0 ), the following describes how to use the link. If you want to click a link and do not do anything, or you want to finish other tasks by clicking the link, you can set its property href = "#". However, when the page
# The default anchor that contains a location information is # top, that is, the top of the Web page. javascript: void (0) only indicates a dead link. This is why sometimes a long page browsing link is clearly #. However, "#" contains a location information. The default anchor is # top, that is, the top of the web page, while
In JavaScript, Void is an operator that specifies that you want to evaluate an expression but not return a value.
void operator usage format is as follows:
1. javascript:void (expression)
2. Javascript:void expression
Expression is an expression of the JavaScript standard to compute. The parentheses outside the exp
Javascript: void (0) click Login does not respond how to solve, javascriptvoid
Use batch processing to solve problems such as IE does not support JavaScript
Rem ===== Batch Processing start ========
Regsvr32 actxprxy. dllRegsvr32 shdocvw. dllRegsvr32 URLMON. DLLRegsvr32 actxprxy. dllRegsvr32 shdocvw. dllRegsvr32 oleaut
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
The format of the void operator is as follows:
1. javascript: void (expression)
2. javascript:
# Contains a location information
The default anchor is # top, that is, the top of the web page.
Javascript: void (0) only indicates a dead link.
This is why sometimes a long page browsing link is clearly #
Beat to top
This is not the case with javascript: void (
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.