Home >Web Front-end >JS Tutorial >Detailed explanation of the difference between js processing of the first value in the list and jsp page processing of the first value in the list_javascript skills

Detailed explanation of the difference between js processing of the first value in the list and jsp page processing of the first value in the list_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:17:321223browse

js:$("

  • " (i==0?"class='cur'":"") "
  • ").appendTo("ul");

    jsp:

           

  • class="${idx.index==1?"cur":""}" >
  • //添加样式

            ${idx.index eq 1 ?"checked":""}>//选中第一个

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn