Last active
February 7, 2024 18:00
-
-
Save bborn/4b5c474375bb3cf1102a56e4c293f352 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
<html> | |
<title>Test</title> | |
<body> | |
This is a test. | |
<script> | |
// Create a new div | |
const div = document.createElement('div'); | |
// Set the div's text content to 'foo' | |
div.textContent = 'This text was added with Javascript'; | |
// Add the div to the body | |
document.body.appendChild(div); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment