zoukankan      html  css  js  c++  java
  • 换皮肤功能link

    换肤功能
    创建Css类,主要是对link元素操作
    <link rel="stylesheet" type="text/css" media="all" href="styles/red.css"  />
    元素标签-link  属性标签-rel、type、media、href


    var head = document.getElementsByTagName("head")[0];
    this.Append = function(url){
        var link = document.createElement("link");
        link.rel = "stylesheet";
        link.type = "text/css";
        link.media = "all";
        link.href = url;
        if (head) {
           head.appendChild(link);
        }
        else {
            document.documentElement.appendChild(link);
        }
        return link;
    }

    this.Remove = function (obj) {
       if (typeof (obj) == "object" && obj.rel == "stylesheet") {
           obj.rel = "NoCss";
       if (head) head.removeChild(obj);
       else document.documentElement.removeChild(obj);
            return true;
       }
       else {
            return false;
        }
    }

  • 相关阅读:
    darknet yolo 使用gpu
    Application of Opposition-Based Reinforcement Learning in Image Segmentation
    图像质量评估 (IQA) 论文笔记: Deep Neural Networks for No-Reference and Full-Reference Image Quality Assessment
    论文笔记:DEEP LEARNING FOR MONAURAL SPEECH SEPARATION
    python函数中的参数*args和**kwargs的含义和用法
    论文笔记:DualCNN(结构和细节分别训练)
    pytorch中为Module和Tensor指定GPU
    Pytorch中的torch.gather函数的含义
    Django(其二)
    第六章Django
  • 原文地址:https://www.cnblogs.com/kuikui/p/2336090.html
Copyright © 2011-2022 走看看