C
Christopher Benson-Manica
Supposedly IE implements the cssRules property for a stylesheet. So
why is the word 'foo' in the below page red and not blue?
<html>
<head>
<style>
.foo { color: #ff0000; }
</style>
</head>
<body>
<span class="foo">foo</span>
<script type="text/javascript">
document.styleSheets[0].cssRules[0].style.color='#0000ff';
</script>
</body></html>
why is the word 'foo' in the below page red and not blue?
<html>
<head>
<style>
.foo { color: #ff0000; }
</style>
</head>
<body>
<span class="foo">foo</span>
<script type="text/javascript">
document.styleSheets[0].cssRules[0].style.color='#0000ff';
</script>
</body></html>