在index.html中怎么引入使用arttemplate写好的模板?
                             回答
回答
                        
                                 筱竹回答
                                筱竹回答
                            
问题解决思路
1、使用jQuery中的Ajax中的$.get方法去请求载入的arttemplate写好的模板,同时在$.get方法的回调函数中去使用template.compile()获取渲染内容,然后将数据渲染进去,最后添加到页面里。
问题解决办法
var html = $.get('template.html',function(data){
           var render = template.compile(data);
           var str = render(obj);
           document.getElementById('box').innerHTML = str;
       })
 
                                    (0)
 
                 
                 
                     
                            