First, let's create an experiment.
Open a blank page in any browser and enter the following code in the address input column:
Copy codeThe Code is as follows: javascript: void (3 );
What will happen?
The answer is nothing happens.
Then, open a blank browser page and enter the following code in the address bar:Copy codeThe Code is as follows: javascript: function test () {return "hello" ;}; test ();
What will happen in this way? Will nothing happen?
Obviously not. We get a new page, and the page content is the value returned by the JS Code (that is, hello );
Why?
Because when the browser parses JS, if there is a return value, a new page will be generated, and if there is no, nothing will be done.
This is why the two examples above have such a difference.
Okay, let's get started.
Let's take a look at the two very similar codes.Copy codeThe Code is as follows: <a href = "#"> hyperlink </a>
Copy codeThe Code is as follows: <a href = "javascript: void (3);"> hyperlink2 </a>
Then, we put the two broken codes on the same page and click them one by one.
It seems that nothing has happened. Is it true that they are equivalent?
Let's look at a piece of code.Copy codeThe Code is as follows: <! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<Meta name = "Generator" CONTENT = "EditPlus">
<Meta name = "Author" CONTENT = "">
<Meta name = "Keywords" CONTENT = "">
<Meta name = "Description" CONTENT = "">
</HEAD>
<BODY>
Here is the page header.
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
[Br]
[Br]
[Br]
[Br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br] [br]] [br] [br] [br] [br] [br] [br] [br]
<A href = "#"> href = # hyperlink </a>
<A href = "javascript: void (3 + 1); alert ('hello');"> href = javascript: void (3 + 1 ); </a>
</BODY>
</HTML>
In this way, we can click two links to see if the effect is different.
If href is #, the page is displayed.
The original '#' represents # top,
The top attribute returns the top-level parent window.
This attribute returns the read-only reference of a top-level window. If the window itself is a top-level window, the top attribute stores references to the window itself. If the window is a framework, the top attribute references the top-level window containing the framework.
The void function returns NULL, that is, to let the browser do nothing.