There are no links in javascript. You can open a new window, change the current location or reload it, you can create an html element which is a link and lots of other stuff, but there is no 'javascript link'. I imagine the thing you are asking about is - how to create <a> link with javascript. Here's the simplest way to do that: //create the <a> tag var myLink = document.createElement('a'); a.href = 'http://mysite.com/'; a.innerHTML = 'link text'; //and append it to the page body document.body.appendChild(myLink); Code (markup):