checkbox和table

mac2022-06-30  62

前台:

<div id="ISO"          style="position:absolute; top:110px; left:330px; height:309; width:309px; padding:10px 20px 0; display:none; background:lightblue;text-align:left; border:2px solid #5d3f0c;z-index:999; font-size:12px; height: 221px;">    <table style="width: 103%; height: 209px;" border="1" cellpadding="1" cellspacing="1">    <tr>    <td colspan="4" style="font-size: large; font-weight: 700; font-family: 隶书" align="center">    ISO认证投资    </td>    </tr>    <tr>    <th width="20%" align="center">操作项    </th>    <th width="17%"  align="center">ISO名称    </th>    <th width="30%"  align="center">投资总时间    </th>    <th width="33%"  align="center">剩余投资时间    </th>    </tr>    <tr align="center">    <td>        <asp:CheckBox ID="checkbox9000" runat="server" />    </td>    <td>        <asp:Label ID="iso9000" runat="server" Text="ISO9000"></asp:Label>    </td>    <td>2年    </td>    <td >        <asp:Label ID="last9000" runat="server" Text=""></asp:Label>    </td>    </tr>    <tr align="center">    <td>        <asp:CheckBox ID="checkbox14000" runat="server" />    </td>    <td>        <asp:Label ID="iso14000" runat="server" Text="ISO14000"></asp:Label>    </td>    <td>2年    </td>    <td>        <asp:Label ID="last14000" runat="server" Text=""></asp:Label>    </td>    </tr>    <tr>    <td colspan="4" align="center">            <asp:Button ID="sureiso" runat="server" Text="确认投资" Height="20px"             Width="72px" οnclick="sureiso_Click"/>                                         <asp:Button ID="quxiaoiso" runat="server" Text="取消" Height="20px"             Width="72px" οnclick="quxiaoiso_Click"/>        </td>    </tr>    </table>    </div>

 

 

后台cs:

 protected void sureiso_Click(object sender, EventArgs e)    {        string tdid = Request.Cookies["tdid"].Value;        int n = 0;        Model.iso iso = new Model.iso();        BLL.iso blliso = new BLL.iso();        if (checkbox9000.Checked)        {            iso.stuid = 1;            iso.isoname = iso9000.Text.ToString();            iso.needseason = 2;            iso.lastseason = 1;            int result = blliso.set(iso);            n += result;        }        if (checkbox14000.Checked)        {            iso.stuid = 1;            iso.isoname = iso14000.Text.ToString();            iso.needseason = 2;            iso.lastseason = 1;            int result = blliso.set(iso);            n += result;        }        if (n == 0)            Response.Write("<script language = javascript>alert('ISO认证投资成功!')</script>");        else            Response.Write("<script language = javascript>alert('对不起,ISO认证投资失败!')</script>");        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "tanchu(" + tdid + ")", true);     }

转载于:https://www.cnblogs.com/J2EEPLUS/archive/2010/05/06/2487931.html

相关资源:Layui Table js 模拟选中checkbox的例子
最新回复(0)