Created
April 2, 2009 20:54
-
-
Save rincewind/89434 to your computer and use it in GitHub Desktop.
This file contains 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 PUBLIC "-//IETF//DTD HTML//EN"> | |
<html> <head> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>innerHTML demo</title> | |
</head> | |
<body> | |
<h1 id="withnbsp">This has an en be es p</h1> | |
<h2 id="withoutnbsp">This does not use en be es pe (uses the \xa0 character)</h2> | |
<h3 id="otherchars"> | |
Umlauts: üäößÜÄÖ, an endash: –, a numeric entity 160 (nbsp): | |
 , "in quotes", less than as a numeric entity: < | |
</h3> | |
<script type="text/javascript"> | |
alert(document.getElementById("withnbsp").innerHTML); | |
alert(document.getElementById("withoutnbsp").innerHTML); | |
alert(document.getElementById("otherchars").innerHTML); | |
</script> | |
<hr> | |
<address></address> | |
<!-- hhmts start --> Last modified: Thu Apr 2 23:31:10 CEST 2009 <!-- hhmts end --> | |
</body> </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment