Js handling the first value in a list versus JSP pages handling the first value in a list


Js: $(” < Li>” + (I = = 0?” Class =” Cur ’ ”:” ”) + ”< / li>” ). AppendTo (” ul ”);

The JSP:

< C: forEach items = ”${list}” var = “listValue varStatus” = “independence idx” >

              < li Class = ”${independence idx. Index = = 1?” Cur ”:” ”}” > < / li> // add style

              < Input  The ${independence idx. Index eq 1?” Checked ”:” ”} > < / input> // select the first one < / c: forEach>