2017-07-27 23 views
2

我我的引用鏈接到我的尾註和我的尾註到我的書目以下方式:如何突出顯示文本的引文和尾註參照頁內鏈接到他們後

<h1>Title</h1> 
<hr /> 

<p>This is a citation where "[1]" links to "&uarr;" in Endnotes and vice-versa.<a id="citation1" href="#endnote1"><sup>[1]</sup></a></p> 

<h1>Endnotes</h1> 
<hr /> 

<ol> 
<li><a id="endnote1" href="#citation1">&uarr;</a>This is an endnote where this <a href="#Short title of reference"><i>Short title of reference</i></a> links to entire <i>reference</i> in Bibliography.</li> 
</ol> 

<h1>Bibliography</h1> 
<hr /> 

<ul> 
<li><a id="Short title of reference">Here goes the entire <i>reference</i>.</a></li> 
</ul> 

其中產量:

標題

這是在尾註引證其中「[1]」鏈接「↑」,反之亦然。 [1]

尾註
  1. ↑這是尾註,其中該的參考簡稱鏈接到整個參考在參考書目。

參考書目


  • 這裏去整個參考

現在我想的是[1],↑和參考簡稱鏈接,要在相應的鏈接帶我到它突出顯示的項目。怎麼能做到這一點?

回答

0

這是怎麼了:

<h1>Title</h1> 
    <hr/> 

    <p>This is a citation.<sup><a id="citation_1" href="#endnote_1" onfocus="highlight(this)" onblur="deHighlight(this)">[1]</a></sup></p> 

    <h1>Endnotes</h1> 
    <hr/> 

    <ol> 
    <li><a id="endnote_1" href="#citation_1" onfocus="highlight(endnote_1Content)" onblur="deHighlight(endnote_1Content)">&uarr;</a><span id="endnote_1Content">This is an endnote citing this <abbr title="Full book title"><a href="#bibliography_1">Short title</a></abbr> for a book.</span></li> 
    </ol> 

    <h1>Bibliography</h1> 
    <hr /> 

    <ul> 
    <li><a id="bibliography_1" href="#" onfocus="highlight(bibliography_1Content)" onblur="deHighlight(bibliography_1Content)"></a><span id="bibliography_1Content">This is a reference for the entire book.</span></li> 
    </ul> 

    <script> 
    function highlight(x) { 
     x.style.background = "lightgrey"; 
    } 

    function deHighlight(x) { 
     x.style.background = ""; 
    } 
    </script>