marionette中的View的el id className tagName 属性

来源:互联网 发布:单片机如何控制电机 编辑:程序博客网 时间:2024/06/10 05:38

</pre>在View中,如果设置了el属性,则该view将会以该el元素为最顶的根元素对象,如果没有,默认为div,也可以通过自己设置的id className 以及 tagName 来设置。 参考: http://segmentfault.com/q/1010000000307330<p></p><p style="margin-top:0px; margin-bottom:25px; word-break:break-word; color:rgb(47,47,47); font-family:'lucida grande','lucida sans unicode',lucida,helvetica,'Hiragino Sans GB','Microsoft YaHei','WenQuanYi Micro Hei',sans-serif; font-size:16px; line-height:27.2px"><span style="line-height:27.2px"></span></p><pre name="code" class="javascript">ContactManager.StaticView=Marionette.ItemView.extend({ id:"static-View",tagName:"span",className:"instruction",template:"#static-template"});
这样得出的html标签如下:

<span id="static-view" class="instruction"><p>this is </p></span>


0 0