requireJS的引用

main.js:

require.config({
  paths: {
    jquery: 'jquery-1.7.2',
    biz: 'biz',
  }
});

require(['jquery', 'biz'], function ($, biz) {
  //$("#msg").text("依赖加载完成了。");这里有点象依赖注入的组装
  biz.changeRemark($, "我想我是海。");
});

//--------------------------------------------------

define(["jquery"], function () {
  //这里定义了依赖jquery
  return {
 
    changeRemark: function(jquery, content) {
      console.info("传入参数:" + content);
      jquery("#Remark").text(content);
    }
 
  };
});
//--------------------------------------------------
原文地址:https://www.cnblogs.com/shi5588/p/requireJS.html