怎样在一个页面中通过点击按钮来改变该页面调用的css文件?

怎样在一个页面中通过点击按钮来改变该页面调用的css文件?
for example: 原先显示页面是调用test.css文件(

1<link href="./test.css" rel="stylesheet"/>

),现在我想通过点击按钮“打印”后,调用print.css文件,该问题怎么解决?
---------------------------------------------------------------

1<html>
2<head>
3<link href="a.css" id="csss" rel="stylesheet" type="text/css"/>
4</head>
5<body>
6<input onclick="document.all.csss.href='a.css'" type="button" value="a.css"/><br/>
7<input onclick="document.all.csss.href='b.css'" type="button" value="b.css"/><br/>
8</body>
9</html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus