var t = _.template("hello: <%= name %><%= name %>,<%= name %>,<%= name %>,<%= name %>,<%= name %>,<%= name %>");
var url = t({name: 'moe'});
alert(url);
var t = _.template("hello: <%= name %><%= name %>,<%= name %>,<%= name %>,<%= name %>,<%= name %>,<%= name %>");
var url = t({name: 'moe'});
alert(url);
本文标题:underscore 使用template拼接字符串
本文链接:https://www.haomeiwen.com/subject/mrpqiqtx.html
网友评论