编写自己的javascript框架

来源:互联网 发布:装修设计实用软件 编辑:程序博客网 时间:2024/06/13 21:48
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <title>js framework template</title>
  <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.js"></script>

<script>

(function(window,undefined){
    var
    _jq=window.jQuery,
    _base=window.base,
    _version='1.0',
    AXCHJS={
        add:function(msg){
            alert(msg);
        },
        version:_version,

    };
    window.axchjs=AXCHJS;
})(window);

$(function(){
    alert(axchjs.version);
});

  </script>

 </head>
 <body>
 </body>
</html>
原创粉丝点击