可以将li标签的循环部分提取出来,只保留循环的li标签部分,如下所示:

<li class="tepe" style="min-height:11em"  th:each="a2 : ${a.kyfwTypes}" >
    <a href="/molecular-biology-service.html">
        <img border="0" th:src="${a2.img}">
    </a>
    <div class="hisright"> 
        <span><a href="" class="kyfw-title" th:text="${a2.name}"></a></span>
        <ul class="quote_ul">
            <li th:each="a3 : ${a2.kyfws}"><a th:href="@{/web/kyfwDesc(id=${a3.id})}" th:text="${a3.kyfwName}"> </a></li>
        </ul>
    </div>
</li>

然后在ul标签上进行循环,如下所示:

<ul class="ulbox"  th:each="a : ${kyfwList.data}">
    <li class="tepe" style="min-height:11em"  th:each="a2 : ${a.kyfwTypes}" >
        <a href="/molecular-biology-service.html">
            <img border="0" th:src="${a2.img}">
        </a>
        <div class="hisright"> 
            <span><a href="" class="kyfw-title" th:text="${a2.name}"></a></span>
            <ul class="quote_ul">
                <li th:each="a3 : ${a2.kyfws}"><a th:href="@{/web/kyfwDesc(id=${a3.id})}" th:text="${a3.kyfwName}"> </a></li>
            </ul>
        </div>
    </li>
</ul>

这样就只循环li标签了

ul class=ulbox theach=a $kyfwListdata				 li class=tepe style=min-height11em theach=a2 $akyfwTypes 					 a href=molecular-biology-servicehtml					 	img border=0 thsrc=$a2img					 a

原文地址: https://www.cveoy.top/t/topic/h2xC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录