var Common = Common || {}; Common.defineNS = function (nsString) { var parts = nsString.split(‘.‘), parent = Common, i; if (parts[0] === "Common") { parts = parts.slice(1); } for (i = 0; i < parts.length; i++) { if (typeof parent[parts[i]] === "undefined") { parent[parts[i]] = {}; } parent = parent[parts[i]]; } return parent; }
时间: 2024-10-18 23:29:26