Ich bin kurz in der Zeit und werde versuchen, kurz zu sein, wenn es ein Problem mit meiner Erklärung Ich werde versuchen, in der Nacht zu bearbeiten.Fügen Sie eine neue Zeile zu einer HTML-Tabelle hinzu, wenn die vorherige/aktuelle gefüllt
Einfach, ich habe eine Tabelle, Name und Alter, es beginnt, wenn die Seite mit einer Zeile geladen wird. Wenn die erste mit etwas gefüllt ist, das nicht Null ist, wird automatisch eine andere Zeile leer geladen.
Ich bevorzuge JavaScript, aber ich könnte auch mit asp.net verwalten. Ich hoffe, ich habe mich gut erklärt und entschuldige mich dafür, dass ich so kurz bin.
Jede Hilfe wäre willkommen.
Edit: Code
<table class="table table-striped" style="margin:10px" id="tablaSKU" runat="server">
<thead>
<tr>
<th></th>
<th>SKU</th>
<th>Precio €</th>
<th>Descripción</th>
<th>Fecha Inicio Demo</th>
<th>Fecha Fin Demo</th>
<th>Tipo de préstamo</th>
</tr>
</thead>
<tbody>
<tr>
<th>1-</th>
<th class="col-sm-2" name="sku"><asp:TextBox ID="sku" runat="server" class="form-control"></asp:TextBox></th>
<th class="col-sm-1"><asp:TextBox ID="precio" runat="server" class="form-control"></asp:TextBox></th>
<th class="col-sm-3"><asp:TextBox ID="descripProd" runat="server" class="form-control"></asp:TextBox></th>
<th class="col-sm-2"><asp:TextBox ID="dataInit" runat="server" class="form-control"></asp:TextBox></th>
<th class="col-sm-2"><asp:TextBox ID="dataFin" runat="server" class="form-control"></asp:TextBox></th>
<th class="col-sm-2">
<asp:DropDownList ID="opcion" runat="server" CssClass="formularioChekLst form-control">
<asp:ListItem>Opciones : </asp:ListItem>
<asp:ListItem>Opción 1</asp:ListItem>
<asp:ListItem>Opción 2</asp:ListItem>
<asp:ListItem>Opcion 3</asp:ListItem>
</asp:DropDownList>
</th>
</tr>
</tbody>
</table>
HTML-Code
<table class="table table-striped" style="margin:10px" id="tablaSKU" runat="server">
<thead>
<tr>
<th></th>
<th>SKU</th>
<th>Precio €</th>
<th>Descripción</th>
<th>Fecha Inicio Demo</th>
<th>Fecha Fin Demo</th>
<th>Tipo de préstamo</th>
</tr>
</thead>
<tbody>
<tr>
<th>1-</th>
<th class="col-sm-2"><input ID="sku" runat="server" class="form-control"></input></th>
<th class="col-sm-1"><input ID="precio" runat="server" class="form-control"></input></th>
<th class="col-sm-3"><input ID="descripProd" runat="server" class="form-control"></input></th>
<th class="col-sm-2"><input ID="dataInit" runat="server" class="form-control"></input></th>
<th class="col-sm-2"><input ID="dataFin" runat="server" class="form-control"></input></th>
<th class="col-sm-2">
<asp:DropDownList ID="opcion" runat="server" CssClass="formularioChekLst form-control">
<asp:ListItem>Opciones : </asp:ListItem>
<asp:ListItem>Opción 1</asp:ListItem>
<asp:ListItem>Opción 2</asp:ListItem>
<asp:ListItem>Opcion 3</asp:ListItem>
</asp:DropDownList>
</th>
</tr>
</tbody>
</table>
Ohne Code ist es unmöglich, Ihnen zu helfen. –
Haben Sie sich Jquery angeschaut? [hier] (http://stackoverflow.com/questions/463506/how-do-i-get-the-value-of-a-textbox-using-jquery) [hier] (http://stackoverflow.com/ Fragen/10619445/the-prefered-Weg-des-Erstellens-ein-neues-Element-mit-jquery) [hier] (http://stackoverflow.com/questions/327047/what-is-the-most-efficient-) Way-to-Create-HTML-Elemente-Using-Jquery) [hier] (http://StackOverflow.com/questions/1481152/How-To-Detect-AtextBoxs-Content-Hash-changed) auch nur [schaut ] (http://stackoverflow.com/questions/171027/add-table-row-in-jquery?rq=1) bei den "verwandten Fragen" auf der rechten Seite. –
Ja, habe ich, aber alle sind auf Schaltflächen bezogen. Was ich will ist, wenn die Linie gefüllt ist, um eine neue zu erstellen –