In web development, sometimes when writing click events for hyperlinks, I like to write like this:
Operation
Once I used jquery to submit an ajax request, the url parameters of the current page A # sign will be automatically added at the end. I was puzzled at first and struggled for a long time. It turned out to be a problem with this writing method. After replacing it with href="javascript:void(0);", the problem no longer occurred.
Note: # Contains a location information, the default anchor point is #top, which is the top of the web page, and javascript:void(0) only represents a dead link.