a tag underline settings and other attributes

Add underscore:

①a{text-decoration:underline;}

②Use the <u> tag to underline the text and position it at the bottom of the a tag

【Note】If the text is not a hyperlink, do not use underline

Remove underscores:

text-decoration:none;

 

1.a Label:

<a href="./333.html">This text</a>
A dot "./" in the href is the same level, indicating the current directory, and two dots "../" are the parent

 2. Refresh the current page

<a onclick="javascript:window.location.reload('');">刷新</a>
<a onclick="javascript:window.history.go(0);">刷新</a>

 

Note: The type "type" in the input must be equal to "button", if it is type="submit", this js will not work

 

3. Click to jump to the top of the page:

①Using HTML anchor tags: the only disadvantage is that the style is not very good, and the anchor tag <a name="top" id="top"></a> will be displayed in the url
as long as it is placed near the top.

Place at the bottom of the page: <a href="#top" target="_self">return to top</a>

②Javascript Scroll function: <a href="javascript:scroll(0,0)">return to top</a>
scroll The first parameter is the horizontal position, and the second parameter is the vertical position. For example, if you want to position it at 50 pixels vertically, scroll(0,50)

②Use the <u> tag to underline the text and position it at the bottom of the a tag

【Note】If the text is not a hyperlink, do not use underline

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326609910&siteId=291194637