code_junkie

Embedding extra styles with noscript

Nov 11th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <head>
  2. ...
  3. <script type="text/javascript">
  4. //<![CDATA[
  5. document.write('<style type="text/css">.noscript{display:none}</style>');
  6. //]]>
  7. </script>
  8. ...
  9. </head>
  10.  
  11. <!doctype html><html>
  12. <head><noscript><style>body{background:red}</style></noscript></head>
  13. <body>is this red? it should <script>document.writeln("not");</script> be. <noscript>indeed.</noscript></body>
  14. </html>
Add Comment
Please, Sign In to add comment