HTML标签本身在Scala HTML中打印

时间:2015-02-10 19:45:07

标签: 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>

                        <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>
}

输出

Bird is printing <p>parrot</p>
Animal is printing <p>Dog</p>
fish is printng <p>StarFish</p>

为什么打印<br /> <p></p>以及文字

0 个答案:

没有答案