var a = document.getElementById('yourlinkId'); //or grab it by tagname etc
a.href = "https://stackoverflow.com/questions/4689344/somelink url"
More Related Contents:
- How to set same value for all the text fields with same name attribute using Javascript?
- How to check the value of input [closed]
- How do I check whether a checkbox is checked in jQuery?
- How to go to a specific element on page? [duplicate]
- How to set HTML5 required attribute in Javascript?
- Can Javascript read the source of any web page?
- Video auto play is not working in Safari and Chrome desktop browser
- Chrome counts characters wrong in textarea with maxlength attribute
- How to add a element to the DOM and execute its code?
- Node.js can’t create Blobs?
- Inserting HTML elements with JavaScript
- Programmatically selecting text in an input field on iOS devices (mobile Safari)
- Can we refer to JavaScript variables across webpages in a browser session?
- Best way to detect that HTML5 is not supported
- Scope of sessionStorage and localStorage
- How to add Drop-Down list () programmatically?
- Decoding URL parameters with JavaScript
- How to detect support for the HTML5 “download” attribute?
- How to create a responsive image that also scales up in Bootstrap 3
- Check if HTML snippet is valid with JavaScript
- How to focus on a form input text field on page load using jQuery?
- Make image fill div completely without stretching
- Drag-and-drop file uploading without AJAX, synchronously in the foreground?
- How to replace html element with ajax response?
- Append HTML to container element without innerHTML
- How to automatic resize tinyMCE?
- HTML/Javascript Button Click Counter
- How to hide optgroup/option elements?
- When to access the attribute (vs the property)?
- How to save and edit a file using JavaScript?