Created
June 13, 2010 21:12
-
-
Save curtis/437011 to your computer and use it in GitHub Desktop.
Setting the inner HTML and href attribute of an anchor tag using JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var link = document.createElement('a'); | |
link.innerHTML = "http://flatterli..."; | |
link.href = "http://flatterline.com"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this one. It was difficult to find the correct syntax to replace url chars.