Skip to content

Instantly share code, notes, and snippets.

@curtis
Created June 13, 2010 21:19
Show Gist options
  • Save curtis/437016 to your computer and use it in GitHub Desktop.
Save curtis/437016 to your computer and use it in GitHub Desktop.
Setting the innerHTML to a non-URL and href attribute to a URL using JavaScript
var link = createElement('a');
link.innerHTML = "This is not a URL";
link.href = "http://flatterline.com";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment