Knowledge Base Nr: 00276 ajax11.txt - http://www.swe-kaiser.de
Downloads:
Ajax: umschalten von stylesheets
#######global4.css:
a { font-size: 10pt;
color: red;
}
#######global3.css:
a { font-size: 20pt;
color: green;
}
#######html:
...
<head>
<link id="CSS" type="text/css" rel="stylesheet" href="/kaiserreich/global3.css">
<script type="text/javascript">
function CSS_Wechsel(cssfile)
{
document.getElementById("CSS").href = cssfile;
}
</script>
...
</head>
<body>
<a href="javascript:CSS_Wechsel('/kaiserreich/global4.css')">1. Stylesheet</a>
<a href="javascript:CSS_Wechsel('/kaiserreich/global3.css')">2. Stylesheet</a>
...