Skip to content

Instantly share code, notes, and snippets.

@3rd-Eden
Created July 19, 2010 10:01
Show Gist options
  • Select an option

  • Save 3rd-Eden/481224 to your computer and use it in GitHub Desktop.

Select an option

Save 3rd-Eden/481224 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>text/html cloneNode</title>
</head>
<body>
<script type="text/html" id="example">{javascript:"contents"}</script>
<script type="text/javascript">
var example = document.getElementById("example");
alert( example.innerHTML ); // >> {javascript:"contents"}
alert( example.cloneNode().innerHTML ); // >> ""
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment