Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// get the current value of the element's inner HTML
var myInnerHTML = document.getElementById("myElement").innerHTML;
for(var i = 0; i < 10; i++) {
myInnerHTML += "some value";
}
// reassign the element's inner html
document.getElementById("myElement").innerHTML = myInnerHTML;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment