20楼#
发布于:2023-02-02 13:50
|
|
21楼#
发布于:2023-02-09 21:12
|
|
22楼#
发布于:2023-02-09 21:14
|
|
24楼#
发布于:2023-02-10 00:16
xiaozhuan:对,明暗这个,要移动就把这些必要但不常用的都移下来。 搞定了 '<button id="theme" class="bottom-button" style="width:15%;">暗</button>' document.getElementById("theme").ontouchstart = function () { var Ctheme = document.getElementById("css"); tColor = document.getElementById("theme"); if (tColor.innerHTML == "暗") { Ctheme.href = Ctheme.href.substr(0, Ctheme.href.length - 12) + "keyboardl.css"; console.log(Ctheme.href); tColor.innerHTML = "明"; } else { Ctheme.href = Ctheme.href.substr(0, Ctheme.href.length - 13) + "keyboard.css"; console.log(Ctheme.href); tColor.innerHTML = "暗"; } } |
|
25楼#
发布于:2023-02-10 11:02
|
|
26楼#
发布于:2023-02-10 20:42
xiaozhuan:感谢,我再试试。回到原帖 这下真改好了 <button id="theme" class="bottom-button" style="width:12%;">暗</button> var skin = document.getElementById("css"); skinX = document.getElementById("theme"); if (skin.href.substr(-12) == "keyboard.css") { skinX.innerHTML = "暗"; } else { skinX.innerHTML = "明"; } document.getElementById("theme").ontouchstart = function () { if (skinX.innerHTML == "暗") { skin.href = skin.href.substr(0, skin.href.length - 12) + "keyboardl.css"; console.log(skin.href); skinX.innerHTML = "明"; } else { skin.href = skin.href.substr(0, skin.href.length - 13) + "keyboard.css"; console.log(skin.href); skinX.innerHTML = "暗"; } } |
|
27楼#
发布于:2023-02-11 18:37
|
|
28楼#
发布于:2023-02-13 19:18
|
|
29楼#
发布于:2023-02-13 21:41
|
|