Skip to content

Instantly share code, notes, and snippets.

@alpgul
Last active October 30, 2018 09:13
Show Gist options
  • Save alpgul/79f88ad66ab29d6d823803a39c69c21d to your computer and use it in GitHub Desktop.
Save alpgul/79f88ad66ab29d6d823803a39c69c21d to your computer and use it in GitHub Desktop.
JavaScript Can Change HTML Content
document.getElementById("demo").innerHTML = "Hello JavaScript!"
document.getElementById('demo').innerHTML = 'Hello JavaScript';
//---------------
document.getElementById("demo").style.fontSize = "35px";
//or
document.getElementById('demo').style.fontSize = '35px';
//-----------
document.getElementById("demo").style.display = "none";
//or
document.getElementById('demo').style.display = 'none';
//----
document.getElementById("demo").style.display = "block";
//or
document.getElementById('demo').style.display = 'block';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment