zoukankan      html  css  js  c++  java
  • 控制 table td 输出 【原】

    Response.Write("<table width='90%' align='center' border='0' cellpadding='3' cellspacing='0' style='border:1px solid #CCCCCC'>\n");
            Response.Write("<tr>\n");
            int columnLimit = 11;
            int columnNo = 0;
            for (int i = 0; i < dataSuppliers.Length; i++)
            {
                if (!dataSuppliers[i].Equals(""))
                {
                    if (columnNo < columnLimit) { columnNo++; }
                    else
                    {
                        Response.Write("</tr>\n");
                        Response.Write("<tr>\n");
                        columnNo = 1;
                    }
                    if (recordExists[i])
                    {
                        string url = "<a href='EnterpriseInfoShow.aspx?creditID=" + creditID + "&dataSupplier=" + dataSuppliers[i] + "'>" + dataSuppliers[i] + "</a>";
                        Response.Write("<td align='center' style='border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;'>" + url + "</td>\n");
                    }
                    else
                    {
                        Response.Write("<td align='center' style='border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;'><font color='#AAAAAA'>" + dataSuppliers[i] + "</font></td>\n");
                    }
                }
            }
            for (int i = columnNo; i < columnLimit; i++) { Response.Write("<td> </td>\n"); }
            Response.Write("</tr>\n");
            Response.Write("</table>\n");
  • 相关阅读:
    The Preliminary Contest for ICPC China Nanchang National Invitational and International Silk-Road Programming Contest
    HDU 5299 Circles Game
    UVALive
    算法笔记--匈牙利算法
    算法笔记--Splay && Link-Cut-Tree && fhq _treap
    P2685 [TJOI2012]桥
    2017-2018 ACM-ICPC German Collegiate Programming Contest (GCPC 2017)
    ACM-ICPC2018南京赛区 Mediocre String Problem
    Project Euler 345: Matrix Sum
    算法笔记--manacher算法
  • 原文地址:https://www.cnblogs.com/xsmhero/p/1910987.html
Copyright © 2011-2022 走看看