1. Location:
Is an image in a Windows window. Its main function is to direct the current webpage to anotherHref is a property of a Web page. It can be used to direct another web page and refresh the page.
2.
A href = "#"> after clicking the link, the page will be rolled up to the top, # The default anchor is # top
After clicking the link, if you do not want to roll the page to the top, you can use href =
Explanation of the differences between a href = # And a href = javascript: void (0)
A href = "#"> after clicking the link, the page will be rolled up to the TOP, # The default anchor is # TOP
After clicking the link, if you do n
After clicking the link, if you do not want to roll the page to the top, you can use href = "javascript: void (0)" instead of href = "#". return false also plays a similar role.
DetailsHref = "#" And href = "
"#" 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
# 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
# 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 (
# 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 # But the page jumps to the top.
This is not the case with javascript: void
Href = "javascript: void (0);" and,
There are two ways to set the
Href = "#". When you click it, it will jump to the top of the page, which is equivalent to clicking an anchor. A # identifier will appear after the URL.
While href
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
A Class="Bt_3"Href="Javascript: void (0 )" ID="Btnsubmit1" Onclick="Submitpage ()">SubmitA>
Submitpage () is a function defined by me. It is used to submit a form when you click
This is because IE6 executes the default action. Currently, there are two solutions:
Method 1:
A Class="Bt_3"Style="Cursor:
Undefined is a global property that indicates that no assignment has been defined or defined.Void is a unary operator that returns undefined no matter what parameters are passed in.The void operator is defined in ECMAScript V1, and undefined is defined in ECMAScript v5. We know that undefined is not a reserved word for JavaScript, so we can use undefined as the variable name. At this point, the undefined we
href= ' # ':
We sometimes write such a connection
Href= ' # # # ':
This is a personal habit of the problem, explain it will understand that based on href= "#" is the location of the anchor is the ID of top, the equivalent of href= "#top", so href= ' #
Sometimes we need to trigger an event without returning a value during js writing, so we may need to write href = "#", which contains a location information. the default anchor is # top, that is, the top of the Web page. When you click this link continuously and quickly, the browser slows down or even crashes.
Of course, we generally use three href = "###", but after reading this article, we can use
, but Javascript has no effect.
The code is as follows:
Nothing happens here.
The following code creates a hyperlink. a form is submitted when a user opens a ticket.
The code is as follows:
Submit a form here
A href = # several methods to differentiate connections with a href = javascript:
, but Javascript has no effect.
The Code is as follows:
Nothing happens here.
The following code creates a hyperlink. A form is submitted when a user opens a ticket.
The Code is as follows:
Submit a form here
A href = # several methods to differentiate connections with a href = javascript:
If you want to do nothing after clicking a link, or respond to the click and complete other tasks, it is generally better to set the property href quot; # quot, the following describes several common solutions for you. If you want to create a link and click it on the webpage, you can also set the href = "#" attribute to respond to the click and complete other tasks. However, when the page has a scroll bar
Ahref # After you click the link, the page will be rolled up to the TOP, # The default anchor is # TOP, javascript: void (0). After you click the link, the page does not move and only opens the link, for details, refer to a href = "#"> after clicking the link, the page will go up to the TOP, # The default anchor is # T
(0) is calculated as 0, but it has no effect on JavaScript.
The Code is as follows:
Copy code
The following code creates a hyperlink. When you click it, the form is submitted.
The Code is as follows:
Copy code
1
When using javascript, we usually call the
The void operator explains that JavaScript scripts often see the following code:
But what does void (0) mean?
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
The forma
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.