Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我真的很努力,有没有人知道为什么下面的语句在 IE 中被呈现为逗号
{{if (true)}}
与以下相同
{{/if }}
尝试使用{{if true}}
{{if true}}
如果您使用的 observable 不在表达式中,那么 jQuery 模板会将其视为一个函数并将其作为函数调用以获取 observable 的值。如果它在表达式中,则不会发生这种情况。
小提琴