Last active
March 6, 2017 18:08
-
-
Save Dosant/561156802bfba8b812fdd2415a68e519 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="my-div"> | |
<strong>Text</strong> | |
</div> | |
<script> | |
var myDiv = document.getElementById('my-div'); | |
console.log(myDiv.innerHTML) // "<strong>Text</strong>" | |
myDiv.innerHTML = '<em>Italic</em>' | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment