Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created November 12, 2010 13:02
Show Gist options
  • Save rummelonp/674066 to your computer and use it in GitHub Desktop.
Save rummelonp/674066 to your computer and use it in GitHub Desktop.
var d = document;
var b = d.body;
var link = d.createElement('a');
var link.appendChild(d.createTextNode('google'));
link.href = 'http://google.com';
b.appendChild(link);
var link2 = '<a href="http://google.com">google</a>';
b.innerHTML += link2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment