When making a page, if you want to do nothing after clicking a link, or complete other things in response to the click, you can set its attribute href = "#". However, there will be a problem when the page has a scroll bar. , after clicking, it will return to the top of the page, or jump to the set anchor point, which is a bad user experience.
Usual usage is:
< ;a href="javascript:void(0)">Click here to see the effect
Actually nothing will happen if you click here, the javascript in it The :void(0); form is a pseudo-protocol of JavaScript, which means that this link will not jump to any place.
The main forms of using javascript:void(0) are as follows:
//Do nothing after clicking the link
test test test //Use 2 to 4 #, most of them are " ####", and also use "#all" and other
//After clicking the link, respond to the user-defined click event
test a>