Windows小工具-javascript更改CSS

Windows gadget - javascript changing CSS

本文关键字:更改 CSS -javascript 工具 Windows      更新时间:2023-09-26

我正在Windows桌面上按计划上学。我对更改有意见,因为"getDay"的值仍然为0,并且显示default.css.

这里检查我的代码:

var currDate = new Date();
var currDay = currDate.getDay();
var newCSS = "default.css";
if (currDay = 0) newCSS = "default.css";
if (currDay = 1) newCSS = "pondeli.css";
if (currDay = 2) newCSS = "utery.css";
if (currDay = 3) newCSS = "streda.css";
if (currDay = 4) newCSS = "ctvrtek.css";
if (currDay = 5) newCSS = "patek.css";
if (currDay = 6) newCSS = "default.css";
document.getElementById('siteCSS').href = newCSS;

怎么了?:-)

在IF:中使用"=="

if (currDay == 0)...