1
<script id="template-upload" type="text/html">
{% for (var i=0, files=o.files, l=files.length, file=files[0]; i<l; file=files[++i]) { %}
<tr class="template-upload fade">
<td class="preview"><span class="fade"></span></td>
<td class="name">{%=file.name%}</td>
<td class="size">{%=o.formatFileSize(file.size)%}</td>
{% if (file.error) { %}
<td class="error" colspan="2"><span class="label important">Error</span> {%=fileUploadErrors[file.error] || file.error%}</td>
{% } else if (o.files.valid && !i) { %}
<td class="progress"><div class="progressbar"><div style="width:0%;"></div></div></td>
<td class="start">{% if (!o.options.autoUpload) { %}<button class="btn primary">Start</button>{% } %}</td>
{% } else { %}
<td colspan="2"></td>
{% } %}
<td class="cancel">{% if (!i) { %}<button class="btn info">Cancel</button>{% } %}</td>
</tr>
{% } %}
</script>
- のようなjsのコードを持って、
{%
または%}
は何を意味するのでしょうか? - なぜスクリプトタグに
id
があるのですか?その使用は何ですか、私は今までに を見たことがありませんでしたか? - スクリプト
type="text/html"
は何を意味していますか?私はいつもtype="text/javascript"
を使っていました。
純粋なJavaScriptですか?何もない。テンプレートエンジンでは、 '