表格添加 点击添加增加一列
改代码来源于广西省平台的uums项目中的jsp/addOrUpdate.jsp界面(使用easyui 前后端未进行分离)//在表格中,点击添加的时候,自动增加一行<table style="width:98%" id="tab" class="table table-bordered table-condensed table-striped table-hover table-responsive"> <tbody> <tr> <th>酒店</th> <th>房间</th> <th>床位单价</th> <th>床位数量</th> <th>操作数量</th> </tr>//在进行添加界面的时候(因为在添加新界面的时候,需要默认有一个空行,因为如果没有空行,就没有办法点击添加按钮,也就没有办法进行自动添加一行)//当时的思路: 在点击添加的时候,将添加的数据进行一个非空判断,如果为null则不添加,否则进行添加,为避免多出空白数据<c:if test="${applyClasses.cid==null||applyClasses.cid==''}"> <tr> <td ><input type='text' name='applyHotelList[0].hotelname' value='' class='inputText'/></td> <td ><input type=