<html lang="en">
<head>
<meta charset="utf-8">
<title>Javascript Getting Element's Attribute Value</title>
</head>
<body>
<a href="#" id="myLink">Our Blog</a>
<script>
// Selecting the element
var link = document.getElementById("myLink");
// Changing the href attribute value
link.setAttribute("href", "https://readytocode.net/");
</script>
</body>
</html>