href related

1: base tag
  <base href="url"/> (base tag must be written in head tag) (<base target="_blank" >: defines all links to open in a new window)
  <base> tag is a page All links on it specify a default address or default destination.
  href attribute: Specify the base url

2:
a: Internal link:
<a href="#/other-name">name</a>
This is a subordinate link starting with the current page


b: Anchor:
<a name= "object-name">name</a><a href="#object-name">name</a>
<a href="#object-name">name</a>
In the above code, we Add the # symbol and the anchor name to the end of the URL to link directly to the named anchor object-name.
Code: <html>

<body>

<p>
<a href="#C4">See Chapter 4. </a>
</p>

<h2>Chapter 1</h2>





<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>

<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>

<h2>Chapter 12</h2>































JavaScript script:
<a href="javascript:alert('It's late at night, rest early!')">Click me! </a>
<a href="javascript:">Back to top</a>? ? ?
It is usually used for jumping, and does not jump to an anchor point #xxx, which is used to achieve effects such as returning to the top.
VBScript script:
<a href=vbscript:msgbox("The time is now:"&time)>Click me! </a>

? ? f: External CSS references:
<link type="text/css" rel="stylesheet" href="../css/test.css" />
 
3: Images can be used for links:
<a href="url" >
<img border="0" src="image address" />
</a>

4:
<style>
a:link {color:blue;}unvisited link
a:visited {color:blue;}visited The link
a:hover {color:red;} on hover
a:active {color:yellow;

Guess you like

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