<div id="template-dom" class="{{m.className}}">
?</div>
<div class="user-profile">
?<div>
<div class="user-avatar">
?<div>
<img src='{{user.avatar}}'>
??{{m.user.name}}
???<script> // your lib code here,should exports a `render` function
?</script>
?<script>
?var m = {
?className:"user",
?user:{
?name:"wscn",
?avatar:"http://notfound.com/img/notfound.png"
?}
?}
? render(document.getElementById('template-dom'),m)
</script>
Javascript代碼的小小疑問(84)——這個引入的文件我該怎么寫?
慕妹3242003
2018-12-06 12:33:44