Sometimes, we need to use the hyperlink <a> instead of href to complete the jump, but instead use this method: <a href="#" onClick="fun()"></a>. This way, the page will not jump. But it also brings some negative problems, such as the page title becomes "#", or a scroll bar appears on the page. This is because after the onClick event is executed, <a> jumps to the address pointed to by href, and "#" is an anchor point, which defaults to the top of the web page, so it will cause the problem mentioned above. There are two solutions: 1. Add a return false statement to the onClick event, for example: <a href="#" onClick="fun(); return false;">Click</a> 2. Use void(0) instead of #, for example: <a href="javascript:void(0)" onclick="fun()">Click</a> |
<<: MySQL series 15 MySQL common configuration and performance stress test
>>: A few front-end practice summaries of Alipay's new homepage
Preface Relational databases are more likely to b...
Apple Mug Icons and Extras HD StorageBox – add on...
Preface: MySQL is a relational database managemen...
Web Application Class 1. DownForEveryoneOrJustMe ...
【author】 Liu Bo: Senior Database Manager at Ctrip...
I recently used the MySql database when developin...
Example: We use the Python code loop_hello.py as ...
Benefits of using xshell to connect to Linux We c...
If you use docker search centos in Docker Use doc...
Table of contents How to set cookies Disadvantage...
Table of contents Essential Difference Database s...
1. Use of Iframe tag <br />When it comes to ...
Table of contents Nginx proxies two socket.io ser...
PSD to div css web page cutting example Step 1: F...
The TextBox with the ReadOnly attribute will be di...