JSP page line feed output

Source: Internet
Author: User

If (skins! = NULL) {<br/> iterator it = skins. keyset (). iterator (); <br/> // key <SPAN class = 'wp _ keywordlink'> Code </span> <br/> int I = 0; <br/> while (it. hasnext () {<br/> string key = (string) it. next (); <br/> skinentry Skin = (skinentry) skins. get (key); <br/> string skinname = Skin. getname (); <br/> string skintitle = Skin. gettitle (); <br/> string imagenormal = Skin. getimage_normal (); <br/> string author = Skin. geta Uthor (); <br/> string deplytime = Skin. getdeploytime (); <br/> // key code <br/> if (I % 3 = 0) out. println ("<tr>"); <br/> string onclick = "onclick =/" doselectskin ('"+ skinname + "')/""; <br/> string onmousemove = "onmousemove =/" classname = 'select _ on_style '/""; <br/> string onmouseout = "onmouseout =/" classname = ''/" "; <br/> string sclass =" "; <br/> string simag = ""; <br/> If (skinname. equals (scurrent_skin) {< Br/> sclass = "class =/" select_on_style/""; <br/> onmousemove = ""; <br/> onmouseout = ""; <br/> onclick = ""; <br/> simag = " "; <br/>}< br/>%> <br/> <TD> <br/> <Table Height = "180px" <% = sclass %> cellpadding = "" cellspacing = "3" <% = onclick %> width = "220px" <% = onmousemove %> <% = onmouseout %> <br/> <tr> <br/> <TD align = "center"> "/> <% = Simag %> </TD> <br/> </tr> <br/> <TD align =" Center "> <% = skintitle %> </TD> <br/> </tr> <br/> <TD align =" center "> author: <% = author %> </TD> <br/> </tr> <br/> <TD align = "center"> Release Date: <% = deplytime %> </TD> <br/> </tr> <br/> </table> <br/> </TD> <br/> // key Code <br/> <% <br/> If (I + 1) % 3 = 0) out. println ("</tr>"); <br/> I ++; <br/>}< br/> If (skins. size () % 3! = 0) {<br/> out. println ("<TD colspan = '" + (3-skins. size () % 3) + "'> & nbsp; </TD> </tr>"); <br/>}< br/>}%>

the above Code is: Three TD lines are output, and the empty TD is not enough. For example, if five pieces of content are output, the second line is not enough. In order to complete the code, enter & NBPs; here. This area is often used to display the Picture preview on the page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.