bootstrap表没有响应,我在表数据中使用输入字段

时间:2015-04-04 07:36:37

标签: html twitter-bootstrap-3

我使用bootstrap作为表,内部表数据有输入字段和显示滚动条。我不想要滚动条和破解词以及响应式设计。

<div class="table-responsive">
<table class="table table-bordered inventory">
<thead>
<tr>
<th><input class="check_all" type="checkbox" onclick="select_all()"></th>
<th>S. No</th>
<th>Product Name</th>
<th>Item Code</th>
<th>Quantity</th>
<th>Rate ($)</th>
<th>Total ($)</th>
</tr>
</thead>

<tr>
<td><input type="checkbox" class="case"></td>
<td><span id="snum">1</span></td>
<td><input type="text" id="productname_1" name="productname[]" value="Rose Petal Garlands" required="" class="ui-autocomplete-input" autocomplete="off">    </td> 
<td><input class="itemcode ui-autocomplete-input" type="text" id="itemcode_1" name="itemcode[]" value="RPG001" required readonly autocomplete="off"></td>
<td><input type="text" class="number quantity ui-autocomplete-input" id="quantity_1" name="quantity[]" value="5" required autocomplete="off"></td>
<td><input type="text" class="number productprice" id="productprice_.1" name="productprice[]" value="5" required></td>
<td><input type="text" class="number tcost" id="tcost_1" name="tcost[]" readonly="readonly" required></td>
</tr>
<tr>                                
<td><input type="checkbox" class="case"></td>
<td><span id="snum">2</span></td>
<td><input type="text" id="productname_2" name="productname[]" value="Jasmine Flowers" required></td> 
<td><input class="itemcode" type="text" id="itemcode_2" name="itemcode[]" value="JF001" required readonly></td>
<td><input type="text" class="number quantity" id="quantity_1" name="quantity[]" value="10" required></td>
<td><input type="text" class="number productprice" id="productprice_.2" name="productprice[]" value="13" required></td>
<td><input type="text" class="number tcost" id="tcost_1" name="tcost[]" readonly="readonly" required></td>
</tr>   
</tbody>
</table>
 </div>

jsfiddle:DEMO

1 个答案:

答案 0 :(得分:0)

<div class="table-responsive">
<table class="table table-bordered inventory">
<thead>
<tr>
<th><input class="check_all" type="checkbox" onclick="select_all()"></th>
<th>S. No</th>
<th>Product Name</th>
<th>Item Code</th>
<th>Quantity</th>
<th>Rate ($)</th>
<th>Total ($)</th>
</tr>
</thead>

<tr>
<td><input type="checkbox" class="case"></td>
<td><span id="snum">1</span></td>
<td><input type="text" id="productname_1" name="productname[]" value="Rose Petal Garlands" required="" class="ui-autocomplete-input" autocomplete="off">    </td> 
<td><input class="itemcode ui-autocomplete-input" type="text" id="itemcode_1" name="itemcode[]" value="RPG001" required readonly autocomplete="off"></td>
<td><input type="text" class="number quantity ui-autocomplete-input" id="quantity_1" name="quantity[]" value="5" required autocomplete="off"></td>
<td><input type="text" class="number productprice" id="productprice_.1" name="productprice[]" value="5" required></td>
<td><input type="text" class="number tcost" id="tcost_1" name="tcost[]" readonly="readonly" required></td>
</tr>
<tr>                                
<td><input type="checkbox" class="case"></td>
<td><span id="snum">2</span></td>
<td><input type="text" id="productname_2" name="productname[]" value="Jasmine Flowers" required></td> 
<td><input class="itemcode" type="text" id="itemcode_2" name="itemcode[]" value="JF001" required readonly></td>
<td><input type="text" class="number quantity" id="quantity_1" name="quantity[]" value="10" required></td>
<td><input type="text" class="number productprice" id="productprice_.2" name="productprice[]" value="13" required></td>
<td><input type="text" class="number tcost" id="tcost_1" name="tcost[]" readonly="readonly" required></td>
</tr>   
</tbody>
</table>
 </div>

jsfiddle:DEMO