摘要: 1. 最简单var template = "this is a {img}";template = template.replace("{img}", "http://xxx");//this is a http://xxx2. 如果template中有两个同样的?var template = "this is a {img}, this {img} is beautiful";template = template.replace(/{img}/g, "http://xxx");//this 阅读全文
posted @ 2013-04-15 20:21 xngeer 阅读(447) 评论(0) 推荐(0)