The lower left corner of the Web page shows javascript:void (0). Solving

Source: Internet
Author: User
Keywords Java void (0) void expression
Tags click expression find java javascript operation operator return
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





Description




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
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.