In some webpages, the This is why sometimes a long page browsing link is clearly # But the page jumps to the top, while javascript: void (0) is not.
Ajax technology is generally used in this form, and our project only adds a click event to process some verification logic and then jumps... The problem arises. in IE6, the click event fails...
The following explan
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 expressi
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 expression are optional, but writing is a good habit. We can use the void operator to specify a hyperlink. The expression is evaluated but does not load any content i
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, this may cause a problem: when the page has a scroll bar, clicking it will return to the top of the page, or jump to the place where the configured anchor is located. The user experience is poor.The common usage is:Copy codeThe Code is as follows: In fact, clicking here will not happen. The javasc
Identifiers undefined do not really reflect "undefined" because undefined is not a JavaScript reserved wordJavaScript provides an void operator that evaluates the specified expression and returns the trusted undefined :void expressionIt is obtained by the following Operation undefined , with 0 the lowest operation cost
# 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
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: pointer ;" ID="Btnsubmit1" Onclick="Submitpag
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Titlebar = no, menubar = no'); ">
Window. open under IE reports invalid parameter error! (Javascript: void (0) is invalid .)
The red part cannot be written in disorder. Currently, only "space" and "-" IE are found to report an error.All of them are error. D
Town Field Poem:The Pure Heart sentiment wisdom language, does not have the world name and the benefit. Learn water under the hundred rivers, give up arrogant slow meaning.Learn to have a small return to feed root, willing to cast a conscience blog. Sincere in this writing experience, willing to see the text to inspire.——————————————————————————————————————————CodeResult——————————————————————————————————————————The essence of the blog, in the technical part, more in the town yard a poem. ide:vs2
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.