Playframework 2.0 HTML标记本身在Scala HTML中打印
输出Playframework 2.0 HTML标记本身在Scala HTML中打印,playframework-2.0,Playframework 2.0,输出 @(mylist:List[_root_.api.controllers.main.livingOrganism]) @main("Welcome Play Template") { <table style="width:100%" border="box" style="border: 1px solid #660066;"><tbody> <tr>
@(mylist:List[_root_.api.controllers.main.livingOrganism])
@main("Welcome Play Template") {
<table style="width:100%" border="box" style="border: 1px solid #660066;"><tbody>
<tr>
<th style="background: #eceaeb; border-right: 1px solid #cccccc; padding: 5px;">Bird</th>
<th style="background: #eceaeb; border-right: 1px solid #cccccc; padding: 5px;">Animal</th>
<th style="background: #eceaeb; border-right: 1px solid #cccccc; padding: 5px;">Fish</th>
</tr>
@for(p <- rpHistory) {
<tr>
<td style="background:#D6FFFF;">@p.bird</td>
<td style="background:#D6FFFF;">@p.animal</td>
<td style="background:#D6FFFF;">@p.fish</td>
</tr>}
<tbody>
</table>
}
为什么要将其与文本一起打印?请将您的问题格式化,以便更好地理解。两个问题:1。您是如何通过inspector工具或查看源代码来检查生成的代码的?2.第三个问题,你能在github上发布这段代码吗?
Bird is printing <p>parrot</p>
Animal is printing <p>Dog</p>
fish is printng <p>StarFish</p>