昨天做个小练习是简单的仓库借取,功能我全部实现了,可是又说页面效果不是他想要的 有要我重做,可是做了一天 试了好多方法均以失败告终所以想找一位高手帮我写下这个前台页面,仅仅实现功能,无关页面美观,后台与数据库的交互代码我在前面就已经写完了 只要写下前台就好了,有没有人能帮忙啊有的+我QQ913402557啊 我给我剩下的全部分值,剩下30另开贴给啊!!

解决方案 »

  1.   

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title></title><script type="text/javascript" src="JS/jquery-1.4.1.js"></script>
        <script type="text/javascript">
            var tr;        jQuery(document).ready(function () {
                jQuery("#TextBox3").blur(function () {
                    var now = parseInt(jQuery("#TextBox3").val(), 10); //jQuery转换服务器控件值
                    var num = parseInt(jQuery("#lblNow").html(), 10);
                    if (now > num) {
                        alert("库存不足");
                    }
                });            jQuery("#Button1").click(function () {
                    tr = "<tr>"
                                    + "<td>借取人:<span>" + jQuery("#TextBox2").val() + "</span></td>"
                                    + "<td>工具名:<span>" + jQuery("#DropDownList1").find("option:selected").text() + "</span></td>"
                                    + "<td>已借出:<span>" + parseInt(jQuery("#lblBorrow").html(), 10) + "</span></td>"
                                    + "<td>现存:<span>" + parseInt(jQuery("#lblNow").html(), 10) + "</span></td>"
                                    + "<td>借取:<span>" + parseInt(jQuery("#TextBox3").val(), 10) + "</span></td>"
                                    + "<td>总数:<span>" + parseInt(jQuery("#lblAll").html(), 10) + "</span></td>"
                                    + "<td>时间:<span>" + jQuery("#Label4").html() + "</span></td>"
                            + "</tr>";
                    jQuery("#table1").append(tr)
                });
           
        });
        </script>
        <style type="text/css">
            .style2
            {
                width: 374px;
                border: 1px solid #808080;
                line-height:30px;
            }
            .Border
            {
                border:1px solid #808080;
            }
            .style4
            {
                border: 1px solid #808080;
                height: 24px;
            }
            .style5
            {
                width: 500px;
                height: 112px;
            }
            .style6
            {
                height: 29px;
            }
            </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="all">
            <input id="Button1" type="button" value="增加" />&nbsp;
            <asp:Button ID="Button3" runat="server" Text="取消" />&nbsp;  
            <input id="Button4" type="button" value="删除" />&nbsp; 
            <asp:Button ID="Button5" runat="server" Text="借取" onclick="Button5_Click"  />
            <br />
            <br />
            <table cellpadding="0" cellspacing="0" class="style2">
                <tr>
                    <td class="style4">
                        姓名:</td>
                    <td class="style4">
                        &nbsp<asp:TextBox ID="TextBox2" runat="server" Width="152px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="Border">
                        时间</td>
                    <td class="Border">
                        &nbsp<asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
            </table>
            <br />
            <table cellpadding="0" cellspacing="1" class="style5">
                <tr>
                    <td class="style6">
                        工具名:<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                            Height="22px" onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                    <td class="style6">
                    </td>
                    <td class="style6">
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        已借出:<asp:Label ID="lblBorrow" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td>
                        现存:<asp:Label ID="lblNow" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        总 数:<asp:Label ID="lblAll" runat="server" Text="Label"></asp:Label>
                    </td>
                    <td>
                        需求:<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
            <br />        <table id="table1" border="1" runat="server"  cellpadding="0" cellspacing="0" width="900px" ></table>
        </div>
        </form>
    </body>
    </html>接着我这个简单的页面写下去,要求,页面刷新货服务器回发的时候点击增加出来的行不会消失,点击借取可以将我添加的所有信息添加进数据库,