current position:Home>Front end < TD > what is the word limit of the label

Front end < TD > what is the word limit of the label

2022-04-29 09:49:13Zhilan was born in a deep valley

<script>
    $(function(){
        $(".cutnum").each(function () {
            var maxwidth = 10;
            if ($(this).text().length >= maxwidth) {
                var b = $(this).children().is("a");
                if (b) {
                    $(this).children().text($(this).children().text().substring(0, maxwidth) + "...");
                } else {
                    $(this).text($(this).text().substring(0, maxwidth));
                    $(this).text($(this).text() + "...");
                }
            }
        })
    })

</script>

<td class="cutnum" th:text="${attraction.a_title}"></td>

copyright notice
author[Zhilan was born in a deep valley],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204290702598671.html

Random recommended