var title = '你好'
ES5
var tpl1 = '<div>' +
'<span>' + title + '</span>'
'</div>'
ES6
var tpl2 = `
<div>
<span>${title + `
<span>${1234} 2016</span>
`}</span>
</div>
`
var title = '你好'
ES5
var tpl1 = '<div>' +
'<span>' + title + '</span>'
'</div>'
ES6
var tpl2 = `
<div>
<span>${title + `
<span>${1234} 2016</span>
`}</span>
</div>
`
转载于:https://www.cnblogs.com/gqx-html/p/9203815.html