Open Amamatthew opened 7 years ago
cookies.js:21 Uncaught ReferenceError: define is not defined at cookies.js:1
cookies.js define('cookies',function (){ var docCookies = { getItem: function (sKey) {.... }, setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {..... }, removeItem: function (sKey, sPath, sDomain) {... }, hasItem: function (sKey) {... }; return { docCookies: docCookies }; }); 也就是当我通过define函数去定义一个AMD规范的模块的时候,页面信息提示define函数未定义 https://developer.mozilla.org/en-US/docs/DOM/document.cookie 即为我希望按照AMD规范定义的cookies模块
define('cookies',function (){ var docCookies = { getItem: function (sKey) {.... }, setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {..... }, removeItem: function (sKey, sPath, sDomain) {... }, hasItem: function (sKey) {... }; return { docCookies: docCookies }; });
cookies.js:21 Uncaught ReferenceError: define is not defined at cookies.js:1
cookies.js
define('cookies',function (){ var docCookies = { getItem: function (sKey) {.... }, setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {..... }, removeItem: function (sKey, sPath, sDomain) {... }, hasItem: function (sKey) {... }; return { docCookies: docCookies }; });
也就是当我通过define函数去定义一个AMD规范的模块的时候,页面信息提示define函数未定义 https://developer.mozilla.org/en-US/docs/DOM/document.cookie 即为我希望按照AMD规范定义的cookies模块