Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.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
Javascript 无法使用jquery模板构建Html控件_Javascript_Jquery_Html_Jquery Templates - Fatal编程技术网

Javascript 无法使用jquery模板构建Html控件

Javascript 无法使用jquery模板构建Html控件,javascript,jquery,html,jquery-templates,Javascript,Jquery,Html,Jquery Templates,我正在使用jquery模板创建一个html表单,除了我不能创建html控件外,其他一切都很完美。下面给出了将html控件显示为文本的表单我的代码 js result[i].Control=“”; $(“#controlTemplate”).tmpl(结果).appendTo(“#controlHolder”); 模板 <script id="controlTemplate" type="text/x-jquery-tmpl"> <tr> <td class=

我正在使用jquery模板创建一个html表单,除了我不能创建html控件外,其他一切都很完美。下面给出了将html控件显示为文本的表单我的代码

js

result[i].Control=“”;
$(“#controlTemplate”).tmpl(结果).appendTo(“#controlHolder”);
模板

<script id="controlTemplate" type="text/x-jquery-tmpl"> 
  <tr>
<td class="text-center">
     ${RowNumber}
</td>
<td>
     ${ControlLabel}
</td>
    <td class="control-td">
        ${Control}
    </td>
  </tr>

</script>

${RowNumber}
${ControlLabel}
${Control}

我目前的发言如下

@monkeyinsight非常感谢您发表评论作为回答
<script id="controlTemplate" type="text/x-jquery-tmpl"> 
  <tr>
<td class="text-center">
     ${RowNumber}
</td>
<td>
     ${ControlLabel}
</td>
    <td class="control-td">
        ${Control}
    </td>
  </tr>

</script>