web css实现整站样式互相切换(2)


}
function writeCookie(name, value, hours, escp) {
    var expire = "";
    if (hours != null) {
        expire = new Date((new Date()).getTime() + hours * 3600000);
        expire = "; expires=" + expire.toGMTString();
    }
    if (escp == "True") {
        document.cookie = name + "=" + value + expire;
    } else {
        document.cookie = name + "=" + escape(value) + expire;
    }
}


function readCookie(name) {
    var nameEQ = name + "=";


    var ca = document.cookie.split(';');


    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];


        while (c.charAt(0) == ' ')
            c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0)
            return c.substring(nameEQ.length, c.length);
    }
    return null;
}
$(document).ready(function() {


    //var title = readCookie("ISCSSSTYLE");
    //var title = "css/CRM_blue.css";


    //if (title != null && title != "undefined") {
    //    setActiveStyleSheet(title);
    //}
});

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdzzgx.html