2011-07-27 23 views

回答

5

您可以用text功能添加任意的文字:

text '<p>foo</p>' 

对于多串,CoffeeScript中的here文档是一种享受:

text ''' 
    <table> 
    <tr> 
     <td>Foo</td> 
    </tr> 
    </table> 
''' 

只要确保你有autoescape设置为false(默认值)。

+0

嘿真棒,谢谢:) – nicolaskruchten

+0

不客气!如果您有兴趣,我也开始研究CoffeeKup [参考资料](https://github.com/mauricemach/coffeekup/blob/master/docs/reference.md)。 – Maurice

相关问题