<script language="javascript" type="text/javascript">
$(function () {
var attendees = { Name: "Hajan", Surname: "Selmani" };
$("#attendeesTemplate").tmpl(attendees).appendTo("#attendeesList");
});
function test(a, b) {
alert(a + " " + b);
return 1;
}
</script>
<script id="attendeesTemplate" type="text/html">
<li>
{{if test(1,2)==1}}
${Name} ${Surname}
{{/if}}
</li>
</script>
为什么jquery模板中的if条件执行了4次?