无为清净楼资源网 Design By www.qnjia.com
tuzhu_req.js 处理文件请求加载异步同步功能,仿效百度图片首页效果制作
/*土著人开发的require组件 @土著人 (http://www.tuzhuren.com)*/ ! function() { function e() {} Function.prototype.bind || (Function.prototype.bind = function(t) { var n = this; if ("function" != typeof n) throw new TypeError("Function.prototype.bind called on incompatible " + n); var o = r.call(arguments, 1), i = function() { if (this instanceof i) { var e = n.apply(this, o.concat(r.call(arguments))); return Object(e) === e "script"); if (t) { var o = setTimeout(t, require.timeout); r.onerror = function() { clearTimeout(o), t() }, r.onreadystatechange = function() { "complete" == this.readyState && clearTimeout(o) } } return r.type = "text/javascript", r.src = e, n.appendChild(r), r; } } function r(e, r, n) { var i = o[e] || (o[e] = []); i.push(r); var a, u = c[e] || {}, s = u.pkg; a = s "head")[0], o = {}, i = {}, a = {}, u = {}, c = {}, p = {}; define = function(name, deps, callback) { if (isArray(deps) && isFunction(callback)) { deps = callback; } i[name] = deps; var r = o[e]; if (r) { for (var n = 0, a = r.length; a > n; ++n) r[n](); delete o[name]; } }, require = function(e) { e = require.alias(e); var t = a[e]; if (t) return t.exports; var r = i[e]; if (!r) return false; t = a[e] = { exports: {} }; var n = "function" == typeof r "deps" in p && a(p.deps), n in i || n in s || (s[n] = !0, l++, r(n, u, o)); } } function u() { if (0 == l--) { var r, o, i = []; for (r = 0, o = t.length; o > r; ++r) try { i[r] = require(t[r]) } catch (a) {} n && n.apply(e, i); } } "string" == typeof t && (t = [t]); for (var p = t.length - 1; p >= 0; --p) t[p] = require.alias(t[p]); var s = {}, l = 0; a(t), u(); }, require.resourceMap = function(e) { var t, r; r = e.res; for (t in r) r.hasOwnProperty(t) && (c[t] = r[t]); r = e.pkg; for (t in r) r.hasOwnProperty(t) && (p[t] = r[t]); }, require.loadJs = function(e) { t(e); }, require.loadCss = function(e) { if (e.content) { var t = document.createElement("style"); t.type = "text/css", t.styleSheet "link"); r.href = e.url, r.rel = "stylesheet", r.type = "text/css", n.appendChild(r); } }, require.alias = function(e) { return e }, require.timeout = 5e3, define.amd = { jQuery: !0, version: "1.0.0" } }(this); ! function() { (function() { var widgets = [], nameIdxMap = {}, callbacks = [], remainings = 0; require.widget = { register: function(name) { var idx = nameIdxMap[name]; if (idx == undefined) { nameIdxMap[name] = widgets.length; widgets.push(1); remainings++; } else { widgets[idx]++; } }, ready: function(callback, ctx) { callbacks.push({ func: callback, context: ctx }); if (remainings < 1) { _ready(); } }, loaded: function(name) { var idx = nameIdxMap[name], num = widgets[idx] - 1; widgets[idx] = num; if (num == 0 && remainings) { remainings--; } if (remainings < 1) { _ready(); } } }; function _ready() { var callback; while (callback = callbacks.pop()) { callback.func.call(callback.ctx); } } })(); }();
希望本文能够给大家学习使用javascript处理文件请求加载异步同步功能有所帮助。
标签:
javascript,异步同步
无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com
暂无评论...
更新日志
2024年11月20日
2024年11月20日
- 柏菲·珞叔作品集《金色大厅2》限量开盘母带ORMCD[低速原抓WAV+CUE]
- Gareth.T《sad songs(Explicit)》[320K/MP3][29.03MB]
- Gareth.T《sad songs(Explicit)》[FLAC/分轨][152.85MB]
- 证声音乐图书馆《海风摇曳·盛夏爵士曲》[320K/MP3][63.06MB]
- 龚玥《金装龚玥HQCD》头版限量[WAV分轨]
- 李小春《吻别》萨克斯演奏经典[原抓WAV+CUE]
- 齐秦《辉煌30年24K珍藏版》2CD[WAV+CUE]
- 证声音乐图书馆《海风摇曳·盛夏爵士曲》[FLAC/分轨][321.47MB]
- 群星 《世界经典汽车音乐》 [WAV分轨][1G]
- 冷漠.2011 《冷漠的爱DSD》[WAV+CUE][1.2G]
- 陈明《流金岁月精逊【中唱】【WAV+CUE】
- 群星《Jazz-Ladies1-2爵士女伶1-2》HQCD/2CD[原抓WAV+CUE]
- 群星《美女私房歌》(黑胶)[WAV分轨]
- 郑源.2009《试音天碟》24BIT-96KHZ[WAV+CUE][1.2G]
- 飞利浦试音碟 《环球群星监听录》SACD香港版[WAV+CUE][1.1G]