Tag href = "javascript :; awareness

javascript: is the default action when triggered, execute JavaScript code, and execute javascript :; represent nothing, nothing happens when you click on this. 

<a href="www.baidu.com"> </a> this refers to a label, then click the jump to Baidu Home

<a href="javascript:;"> </a> click is not going to jump, generally used for the development of the page has not been completed.

href = "javascript :;" is to remove the default behavior of a tag with href = "javascript: void (0)" is the same, void of JavaScript is an operator, void (0) is to do nothing means

Briefly, "javascript:" is another method js code page nested. 
By nesting js code label with the same.

<a href = "javascript:alert(22);"> point I </a> 
If you do not enter JS content
<a href = "javascript:;"> </a> point I 
said nothing execution



Guess you like

Origin www.cnblogs.com/kcvo1995/p/11294043.html