简单的模板解析函数
templ: function (str, map, urlencode, cascade) { /* if ( map && typeof map !== 'object' && !map.length ) { map = $.makeArray( map ); } */ return str.replace(/{([w_$]+)}/g, function (s, s1) { var v = map[s1]; if (cascade && typeof v === 'string') v = argument.callee(v, map, urlencode, cascade); if (v === undefined || v === null) return ''; return urlencode ? encodeURIComponent(v) : v; }); },