【问题标题】:dealing with if condition in thymeleaf处理百里香中的 if 条件
【发布时间】:2014-01-07 13:38:20
【问题描述】:

我是 thymeleaf 的新手,我在执行 if 条件时遇到了问题。我写的代码是

<tr th:if="${id &eq; 1 and mobNumber &eq; 1}" height="40" valign="top">
          //some code here
</tr>

问题是这段代码在编写时网页一直在加载。谁能告诉我执行此操作的正确方法。

【问题讨论】:

标签: java html spring thymeleaf


【解决方案1】:

哟,我只是通过将 &amp;eq; 替换为 == 得到它,它运行良好。我将代码更改为

<tr th:if="${id==1 and mobNumber==1}" height="40" valign="top">
      //some code here
</tr>

【讨论】:

    猜你喜欢
    • 2018-02-03
    • 2015-06-16
    • 1970-01-01
    • 2017-04-05
    • 2019-01-04
    • 2021-06-17
    • 2018-08-25
    • 2015-03-15
    • 1970-01-01
    相关资源
    最近更新 更多