<!DOCTYPE html>
<html>
<body>

<p><a id="myAnchor" href="../index.html">W3Schools</a></p>

<p>Click the button to set the value of the type attribute of the link above to "text/html".</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    document.getElementById("myAnchor").type = "text/html";
    document.getElementById("demo").innerHTML = "The value of the type attribute of the link above is now 'text/html'.";
}
</script>

</body>
</html>