The
void operator is evaluated over an expression and returns undefined. The operator is most useful when you want the value of an expression but do not want the remainder of the script to see this result.
such as: <a href= "javascript:void (0)" > click here to see Effect </a>
//Actually click here to do nothing, to perform some processing, but not to refresh the page as a whole, you can use void (0), but if you need to refresh the page, it will be careful. Specifies the hyperlink with the void operator. The expression is evaluated but does not load any content in the current document. The code for the page creates a hyperlink, and nothing happens when the user clicks on it. When the user clicks on the link, void (0) evaluates to 0, but there is no effect on JavaScript.
such as: <a href= "Javascript:void (Document.form.submit ())" > Click here to submit the form </a>//The user will submit the form when clicked
Note: The difference between <a href= "#" > Single </a> and <a href= "javascript:void (0)" > Single </a>: #只是包含一个位置信息, the default anchor is #top, The top of the page. Javascript:void (0) is a link that does not work.
Custom Function
<script>
function Openwin (tag,obj)
{
obj.target= "_blank"; Open Mode
obj.href = "page address. aspx parameter name =" +TAG; Open Address
Obj.click (); Instructions to start
}
</script>
help you with the problem and "the lower left corner of the page shows Javascript:void (0)." Irrelevant and you see if you're disabling JavaScript yourself
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.