1.css
============================
body {
color: blue;
}2.css
============================
body {
color: red;
}1.htm
=========================
<link rel="stylesheet" href="1.css" type="text/css">
hello,world!
<SCRIPT LANGUAGE="JavaScript">
document.styleSheets[0].href="2.css"
</SCRIPT>
============================
body {
color: blue;
}2.css
============================
body {
color: red;
}1.htm
=========================
<link rel="stylesheet" href="1.css" type="text/css">
hello,world!
<SCRIPT LANGUAGE="JavaScript">
document.styleSheets[0].href="2.css"
</SCRIPT>
<link href="2.css" id="c2" rel="stylesheet" type="text/css" disabled="disabled">
<span class="zhong">123</span>
<input type="button" onclick="document.getElementById('c1').disabled=true;document.getElementById('c2').disabled=false" value="Set CSS">1.css.zhong{
font-size: 24px;
color: #FF0000;
}2.css.zhong{
font-size: 12px;
color: #0000FF;
}