代码拉取完成,页面将自动刷新
(function(c){c.fn.extend({populate:function(b,g){function f(a){return h.replace("{key}",a.key).replace("{value}",a.value)}var i={select:null,exclude:null,opPopulate:null},h='<option value="{key}">{value}</option>',j=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,d=[],e;if(b instanceof Object)for(e in b)b.hasOwnProperty(e)&&d.push(f({key:e,value:b[e]}));else b.constructor===String&&""!==b&&(j.test(b)?d=b:c.map(b.split("&"),function(a){d.push(f({key:a.split("=")[0],value:a.split("=")[1].replace("+"," ")}))}));
return this.each(function(){var a=c.extend(i,g),b=c(this);"SELECT"===this.nodeName&&(b.find(a.exclude?"option:not("+a.exclude+")":"option").remove().end().append(d).removeAttr("disabled"),null!==a.select&&c(this.options).removeAttr("selected").filter(a.select).attr("selected","selected"),a.onPopulate&&c.isFunction(a.onPopulate)&&a.onPopulate.apply(this,[d]))})}})})(jQuery);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。