标签:style blog color io ar sp div on cti
var i18n = {label:‘label‘,value:‘value‘}; var str = ‘<div><div><%label%>:{label}</div><div><%value%>:{value}</div></div>‘; var reg = /<%([^%]+)%>/g; str.replace(reg, function($0, $1){ return i18n[$1]; });
标签:style blog color io ar sp div on cti
原文地址:http://www.cnblogs.com/flywind2009/p/4037551.html