Created
March 6, 2017 18:12
-
-
Save Dosant/e58b4a29db8692dfdfe9d9f9edc93eff 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="div-1"> | |
</div> | |
<div id="div-2"> | |
</div> | |
<script> | |
var div1 = document.getElementById('div-1'); | |
var div2 = document.getElementById('div-2'); | |
div1.innerHTML = '<strong>Text</strong>' // Запишет Text | |
div2.textContent = '<strong>Text</strong>' // Запишет <strong>Text</strong | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment