<script type="text/template" id="temp"> 报错? 20
1个回答
展开全部
<script type="text/template" id="member-tmpl">
<% var addHeader = true;
_.each(members, function(member) {
if ( Modernizr.mq( "only all and (max-width: 640px)" ) ) {
addHeader = true;
}
%>
<div class="row member">
<div class="col"><% if ( addHeader ) { %><div class="head">Id</div><% } %><div class="data"><%=member.id%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Name</div><% } %><div class="data"><%=member.name%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Email</div><% } %><div class="data"><%=member.email%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Phone #</div><% } %><div class="data"><%=member.phoneNumber%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">REST URL</div><% } %><div class="data"><a href="rest/members/<%=member.id%>" rel="external" target="_blank" class="resturl ui-link">JSON</a></div></div>
</div>
<% addHeader = false;
}); %>
</script>
<% var addHeader = true;
_.each(members, function(member) {
if ( Modernizr.mq( "only all and (max-width: 640px)" ) ) {
addHeader = true;
}
%>
<div class="row member">
<div class="col"><% if ( addHeader ) { %><div class="head">Id</div><% } %><div class="data"><%=member.id%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Name</div><% } %><div class="data"><%=member.name%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Email</div><% } %><div class="data"><%=member.email%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">Phone #</div><% } %><div class="data"><%=member.phoneNumber%></div></div>
<div class="col"><% if ( addHeader ) { %><div class="head">REST URL</div><% } %><div class="data"><a href="rest/members/<%=member.id%>" rel="external" target="_blank" class="resturl ui-link">JSON</a></div></div>
</div>
<% addHeader = false;
}); %>
</script>
追问
这个是什么意思呀?
你能帮我看看73行为什么报错,是语法问题,还是环境不支持呢? 要不要引入什么文件?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询