在javascript中,怎么来控制css变换不同的风格

来源:百度知道 编辑:UC知道 时间:2024/09/25 12:38:46
开始是var col = new Date().getSecent() % 3 +1;
doncument.write(link href="col.css" rel="stylesheet" type="text/css")
我想知道后面的写法;
doncument.write(link href="col.css" rel="stylesheet" type="text/css")
这样写对吗?
急!!!

var col = new Date().getSecent() % 3 +1; --> new Date().getSeconds()

var links = document.getELementsByTagName("LINK");
links[0].href="col.css";

这样写是
不太好的

你要只会写这种代码的话还是算了把,给你代码你也看不懂

不对