Skip to content

Instantly share code, notes, and snippets.

@Philocoder93
Created December 17, 2016 19:06
Show Gist options
  • Select an option

  • Save Philocoder93/1ecb98c633460f8adaafa0d4d08ae37b to your computer and use it in GitHub Desktop.

Select an option

Save Philocoder93/1ecb98c633460f8adaafa0d4d08ae37b to your computer and use it in GitHub Desktop.
document.querySelectorAll('.current')[1].textContent = 'Me Talk Pretty One Day.'
document.getElementById('next').innerHTML = '<a href="http://www.amazon.com/Flamethrowers-Rachel-Kushner/dp/1439142017/ref=sr_1_1?ie=UTF8&qid=1458897183&sr=8-1&keywords=the+flamethrowers">The Flamethrowers</a>';
document.querySelector('li').innerHTML = 'The Wind Up <strong>Bird</strong> Chronicle.';
document.querySelectorAll('li')[3].textContent = "I'm the fourth!"
var listLi = document.getElementsByTagName('li');
for (i=0;i<listLi.length;i++) {
document.getElementsByTagName('li')[i].textContent = 'JavaScript rules!'
}
document.getElementsByClassName('current')[0].innerHTML = 'Manipulating the DOM is fun!';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment