Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
语法错误,jquery模板_Jquery - Fatal编程技术网

语法错误,jquery模板

语法错误,jquery模板,jquery,Jquery,我试图在jquery模板中使用模数运算符,但出现语法错误 Uncaught SyntaxError: Unexpected token { {{if Items.length > 0}} <div> <table class='table table-bordered' style='width:450px;'> <thead style='text-align:center;'>

我试图在jquery模板中使用模数运算符,但出现语法错误

Uncaught SyntaxError: Unexpected token { 

{{if Items.length > 0}}
    <div>
        <table class='table table-bordered' style='width:450px;'>
            <thead style='text-align:center;'>
            <td>
                <strong>Related Topics</strong>
            </td>
            </thead>
            {{each Items}}
             {{if ${$index} % 6===0}}
                <td>
                        <input type='hidden' name='subUniqueKey${DomainObjectUniqueKey}' value='${DomainObjectUniqueKey}' />
                        <input type='checkbox' name='chkTopics${DomainObjectUniqueKey}'/><label id='labRelTopicsDisplay${DomainObjectUniqueKey}'>${subject}</label>  
                </td>
             {{/if}}
        {{/each}}
      </table>
    </div>
{{/if}}
未捕获的语法错误:意外标记{
{{if Items.length>0}
相关主题
{{每项}}
{{如果${$index}%6===0}
${subject}
{{/if}
{{/每个}}
{{/if}
关于错误所在的建议


谢谢

我想这是导致错误的部分

{{if ${$index} % 6===0}}
试着把它改成

{{if $index % 6===0}}