Last active
February 5, 2018 23:41
-
-
Save lricoy/e156807c575b586f94e24061e6d670e3 to your computer and use it in GitHub Desktop.
Simple Plain JS/HTML create element
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> | |
<body> | |
<div id="myApp"></div> | |
<script type="text/javascript"> | |
const rootElement = document.getElementById('myApp') | |
const message = document.createElement('span') | |
message.className = 'stylish-message' | |
message.innerText = 'Simple HTML' | |
rootElement.appendChild(message) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment