I am trying to CSS assigned inside the head tag开发者_如何转开发 using JS, its not working for IE any idea why? IE just show "Unknown runtime error".
<html>
<head>
<style id="style_id" type="text/css">
</style>
</head>
<body>
<p>This is the test Text</p>
</body>
<script>
var st = document.getElementById("style_id");
st.innerHTML = "p { color:red}";
</script>
</html>
Are you looking for this one?
精彩评论