<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>无刷新变换样式表</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="jsfile/imagesa35/css1.css" rel="stylesheet" type="text/css" id="css">
</HEAD>
<script type="text/javascript">
function change(a){
var css=document.getElementById("css");
if (a==1)
css.setAttribute("href","jsfile/imagesa35/css1.css");
if (a==2)
css.setAttribute("href","jsfile/imagesa35/css2.css");
if (a==3)
css.setAttribute("href","jsfile/imagesa35/css3.css");
}
</script>
<BODY>
<div id="chs">
<a href="#" onClick="change(1)">使用样式表1</a>
<a href="#" onClick="change(2)">使用样式表2</a>
<a href="#" onClick="change(3)">使用样式表3</a><br />换了样式表
</div>
</BODY>
</HTML>
无刷新变换CSS样式表
最新推荐文章于 2021-08-03 21:07:33 发布