Skip to content

Instantly share code, notes, and snippets.

@redbluish
redbluish / webcommon.js
Created April 2, 2014 03:03
异步顺序加载JS脚本
var WebCommon = (function (func) {
return func(WebCommon || {}, $);
}).call(this, function (wc, $, undefined) {
var
// 获取指定param的查询字符串值
query = function (param) {
var match = RegExp('[?&]' + param + '=([^&]*)').exec(location.href.split('#')[0]);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
},