I'm html-formatting my teacher union's new contract for our member website. We'd like to have a link icon (or the words 'copy link') after different sections (that have the name attribute). This will allow members to copy links to different sections to his/her clipboard.. and then direct others to specific sections of our very long contract. Can I do this with html code?
Here's my progress:
<script>
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
alert("Copied the text: " + copyText.value);
}
</script>
<input size="20" type="text" value="https://www.example.com#ARTICLE2" id="myInput"><button onclick="myFunction()">Copy text</button>