<%@page contentType="text/html; charset=gbk"%>
<html>
<head>
<link id="theme_css_id" rel="stylesheet" type="text/css">
</head>
<body >
<input type="button" οnclick="change(2)" value="换肤哈">
</body>
</html>
<script language="JavaScript">
function change(a){
var aa = document.getElementById("theme_css_id");
aa.href = "<%=request.getContextPath()%>/webframe/example/00"+a+".css";
}
document.onload = change(1);
</script>
注:
001.CSS
002.CSS
分别定义两种风格的CSS