Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<p><a id="myAnchor" target="_blank" href="http://www.example.com:443/test.htm#part2">Example link</a></p>
<p>Click the button to change the port number of the link above.</p>
<p><b>Tip:</b> Open the link and look in the address bar before and after you have clicked the "Try it" button, to see the effect.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("myAnchor").port = "80";
  document.getElementById("demo").innerHTML = "The port number was changed to '80'.";
}
</script>
</body>
</html>