zoukankan      html  css  js  c++  java
  • seajs

    项目结构

      sea-demo

           sea.html

               sea.js

               assert

            admin.js

            user.js

    sea.html

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>hello sea</title>
    <script type="text/javascript" src="sea.js"></script>
    </head>
    
    <body>
        <script type="text/javascript">
            seajs.config({
                base:'assert/'
            });    
            seajs.use(['user','admin'],function(user,admin){
                user.show();
                admin.show();
            });
        </script>
    </body>
    </html>

    user.js

    define(function(require,exports,module){
                    var admin = require('admin');
                        admin.show();
                    exports.show=function(){
                            alert('I am user! ');
                    }
    });

    admin.js

    define(function(require,exports,module){
        exports.show=function(){
            alert(' I am admin! ');
        }
    });
  • 相关阅读:
    mouse_event,keybd_event
    构造自己的StringGrid
    BMP2JPG,JPG2BMP
    $J的用法
    一个简单的系统托盘程序
    构造自己的双向链表
    C++的iostream标准库介绍
    D3DXVec4Dot 函数
    3D游戏从头编之D3D(3)
    D3DXVec4Cross 函数
  • 原文地址:https://www.cnblogs.com/BigIdiot/p/3492923.html
Copyright © 2011-2022 走看看