简体   繁体   English

当我使用 kendo ui 模板时它不起作用

[英]when i using kendo ui template it's not working

when using kendo ui template like this :当使用这样的剑道 ui 模板时:

var token = kendo.template("<tr><td>#=fname#</td><td>#=DOB#</td>
              <td>#=gender#</td><td>#=active#</td><td></td><td></td><td>
               <span class='glyphicon glyphicon-remove icon-sl' 
                   id='removeIcon' data-index='#=index#'
                      data-id='#=id#'  onclick='removeUser(this)'>
               </span></td></tr>");

it's give me :它给了我:

token = (function(data/**/) {var $kendoOutput, $kendoHtmlEncode = 
 kendo.htmlEncode;with(data){$kendoOutput='<tr><td>'+(fname)+'</td><td>'+
 (DOB)+'</td><td>'+(gender)+'</td><td>'+(active)+'</td><td></td><td></td>
 <td><span class=\'glyphicon glyphicon-remove icon-sl\' id=\'removeIcon\' 
  data-index=\''+(index)+'\'  data-id=\''+(id)+'\'  
  onclick=\'removeUser(this)\'></span></td></tr>';}return $kendoOutput;
 })

and i want it return the html with only the between hash is correct我希望它只返回 html 之间的哈希值是正确的

its not clear from your question what are you asking for ?从你的问题中不清楚你要什么?

A template is like a blueprint.模板就像蓝图。 you create the template and at runtime provide data to the template and ask it to render the markup.您创建模板并在运行时向模板提供数据并要求它呈现标记。 Template will replace the placeholder you have place like #= # with acutal value and give you the markup.模板将用实际值替换您拥有的占位符,如 #= # 并为您提供标记。

Basic usage of kendo ui template is shown here as a demo: http://demos.telerik.com/kendo-ui/templates/index剑道 ui 模板的基本用法在此处显示为演示: http : //demos.telerik.com/kendo-ui/templates/index

Do take a look at the demo.请看一下演示。 Do explain clearly what is your issue and what is the output you are looking for.请清楚说明您的问题是什么以及您正在寻找的输出是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM