Links to the current page. ------------------- Common usages are as follows : <a href="#" onclick="window.close()">Close</a> Setting href="#" to link to the current page is actually meaningless, and the page will not refresh. The key is the onclick that follows. When you click "Close", the window.close() code will be executed. You might ask why not just write <a onclick="window.close()">Close</a> If written like this, the two words "close" will not be processed as a hyperlink and the effect will look worse. You can try it yourself. When making a web page, the parameters in the HTML language are used to specify the link url. #### is the link to this page, and href="address" is the link to the address. The default link is this page, and no new window will pop up. For an empty link, if # is removed, the mouse hand cursor will not be displayed. In layman's terms, it is a fake link pointing to this page. You can also add the anchor ID after #. This is actually another way to use a bookmark. Create a bookmark <br />Syntax: <a name="Bookmark name">Text</a> Bookmarks linking to the same page (use) Syntax: <a href="#bookmark name">link text</a> The syntax of a bookmark linking to a different page is: <a href="link file address#bookmark name">link text</a> (note the quotation marks and #) Under normal circumstances, if you click on the link: <a href="#Bookmark name">Link text</a>, the cursor will automatically jump to the position of: <a name="Bookmark name">Text</a> on this page. But if you write: <a href="#">link text</a> without writing the bookmark name, it will actually not jump to anything. Generally, href="#" will only be reached when <a onclick=""> Just treat it as an empty link. It will show the link effect (such as the mouse turns into a small hand), but there is no page jump. |
<<: The past two years with user experience
>>: Use Docker to create a distributed lnmp image
The command format for mysql login is: mysql -h [...
I plan to realize a series of sticky note walls. ...
The default arrangement of text in HTML is horizo...
background PNG images take up more storage space ...
Table of contents Prerequisites RN passes value t...
First, the principle of esp8266 publishes message...
An index is a sorted data structure! The fields t...
A problem occurred when configuring a cluster. Or...
Preface This article mainly introduces the releva...
Table of contents DOM processing Arrays method Su...
CSS 3 animation example - dynamic effect of Tab b...
1. Rendering 2. Source code HTML < body > &...
This article shares the specific code of jQuery t...
Table of contents What is multi-environment confi...
In the forum, I saw netizen jeanjean20 mentioned h...