Home  >  Article  >  Web Front-end  >  js对列表中第一个值处理与jsp页面对列表中第一个值处理的区别详解_javascript技巧

js对列表中第一个值处理与jsp页面对列表中第一个值处理的区别详解_javascript技巧

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

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