一个CSS文件内如何设置多个body及多个DIV样式,并给出页面如何调用
<link rel="stylesheet" type="text/css" href="style/1.css" title="CSS1" ID="CSS1">
<link rel="stylesheet" type="text/css" href="style/2.css" title="CSS2" ID="CSS2" DISABLED>
<link rel="stylesheet" type="text/css" href="style/3.css" title="CSS3" ID="CSS3" DISABLED>
<link rel="stylesheet" type="text/css" href="style/4.css" title="CSS4" ID="CSS4" DISABLED>
<script>
function changeCss(id)
{
for (var i=1;i<5;i++)
{
if (i==id)
document.getElementById("CSS"+i).disabled = false;
else
document.getElementById("CSS"+i).disabled = true;
}
}
</script>
<link rel="stylesheet" type="text/css" href="style/2.css" title="CSS2" ID="CSS2" DISABLED>
<link rel="stylesheet" type="text/css" href="style/3.css" title="CSS3" ID="CSS3" DISABLED>
<link rel="stylesheet" type="text/css" href="style/4.css" title="CSS4" ID="CSS4" DISABLED>
<script>
function changeCss(id)
{
for (var i=1;i<5;i++)
{
if (i==id)
document.getElementById("CSS"+i).disabled = false;
else
document.getElementById("CSS"+i).disabled = true;
}
}
</script>