• 控制 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");
  • 相关阅读:
    西门子SCL读写DB数据
    LeetCode8.字符串转换整数(atoi) JavaScript
    LeetCode8.字符串转换整数(atoi) JavaScript
    WebRequestSugar
    iosblock用法
    datasci
    UINavigationController学习笔记
    iOSTab bar
    自定义tab bar控件 学习资料
    Ios tab Bar 使用方法
  • 原文地址:https://www.cnblogs.com/xsmhero/p/1910987.html
Copyright © 2020-2023  润新知