netsurf/test/js/doc-write-style.html

17 lines
296 B
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<style>
p { color: red; background: #fdd; }
</style>
</head>
<body>
<noscript><p>Javascript is disabled</p></noscript>
<script>
document.write('<style>p#foo { color: green; background: #dfd; }</style>');
</script>
<p id="foo">JS makes me green!</p>
</body>
</html>