<a> label binding click events

 

<a> tag is the most commonly used page jump:

<a href="https://www.baidu.com">百度</a>

 

<a> Tags Add click event:

<a href="javascript:void(0);" onclick="GoToNext()"></a>

This is the most common way. onclick js function responsible for executing the method. While an operator is void, void (0) return undefined, the address jump does not occur. But this method does not directly exposed to the js method in the status bar of the browser.

 

 

Reference URL: https: //blog.csdn.net/shiyong1949/article/details/73223619

Guess you like

Origin www.cnblogs.com/Fourteen-Y/p/12067412.html