You are unnecessary to use 'document.write' method to change different style.
Most of you can get the specific stylesheet object, then change the 'href' property according to your idea.
Most of you can get the specific stylesheet object, then change the 'href' property according to your idea.
<STYLE>
BODY {background-color: #CFCFCF;}
</STYLE>
<style>
<SCRIPT>
window.onload=fnInit;
function fnInit(){
// 访问 styleSheet 中的一条规则, 将其 backgroundColor 改为蓝色。
var oStyleSheet=document.styleSheets[0];
var oRule=oStyleSheet.rules[0];
oRule.style.backgroundColor="#0000FF";
}
</SCRIPT>
引用的话直接像楼上所说,改变href属性就可以了