我正在检查html页面上的源代码并遇到了这个问题
<script id="searchItemTemplate" type="text/html">
<# var rows = Math.floor((Model.RecordsPerPage - 1) / 3 + 1);
for (var i = 0; i < rows; ++i){
var startIdx = i * 3;
var endIdx = startIdx + 3;
#>
//etc ....
</script>
我以前从未见过这个。 什么是脚本type="text/html"
。 我不知道它是否有所作为,但这是在.aspx页面上。
这是某种占位符需要解析和eval()以后吗?
有谁知道这是什么?
使用这种方法的人可以解释这些好处吗?