My97DatePicker源码的K方法

 

<head></head>
<script>
    var X = window,M = "document", C = "getElementsByTagName";
    //A是css的链接,$是标题,B是字符集
    function K(A, $, B) {
        var D = X[M][C]("HEAD").item(0), _ = X[M].createElement("link");
        if (D) {
            _.href = A;
            _.rel = "stylesheet";
            _.type = "text/css";
            if ($)
                _.title = $;
            if (B)
                _.charset = B;
            D.appendChild(_)
        }
    }
    
    //创建一个link
    var linkVar = document.createElement("link");
    linkVar.href = "https://files.cnblogs.com/coffeedeveloper/coffee.css";
    linkVar.rel = "stylesheet";
    linkVar.type = "text/css";
    linkVar.title = "这是coffee样式";
    linkVar.charset = "UTF-8";
    //document.getElementsByTagName("HEAD").item(0).appendChild(linkVar);
    window['document']['getElementsByTagName']("HEAD").item(0).appendChild(linkVar);
    
    K("http://common.cnblogs.com/css/reset.css","博客园的css","UTF-8");
</script>

 

posted @ 2013-09-10 20:20  wuhn  阅读(594)  评论(0编辑  收藏  举报