当前位置:编程学习 > JAVA >>

form表单嵌套table问题

<form  action="a.jsp" method="post">
        <div>
           <span>顾客姓名:</span>
           <input type="text" value="${customerBean.customerName }" readonly="readonly"/>
           <input type="hidden" name="customerid" value="${customerBean.customerId}">
        </div>
        <br>
        <div>
           <span>入住房间:</span>
            <table border="1" cellpadding="2" cellspacing="0" style="float:center;" height="5">
      <tr>
        <th width="5%">房间编号</th>
        <th width="5%">房间号</th>
        <th width="20%">所属分店</th>
        <th width="10%">所属房型</th>
        <th width="35">房间设备</th>
        <th width="10">房间状态</th>
        <th width="5">房价</th>
        <th width="10%">操作</th>
      </tr>
      <c:if test="${not empty roomList}">
      <c:forEach items="${roomList}" var="roomBean">
       <tr align="center">
         <td>${roomBean.roomId }</td>
         <td>${roomBean.roomOtherName }</td>
         <td>${roomBean.hotel.hotelName }</td>
         <td>${roomBean.type.typeName }</td>
         <td>${roomBean.type.typeEquip }</td>
         <td>${roomBean.roomStatus }</td>
         <td>${roomBean.type.typePrice }</td>
         <td>
         <span>
           <input type="button" onclick="update(${roomBean.roomId });" value="入 住" />
         </span>
         </td>
       </tr>
      </c:forEach>
   </c:if>
    </table>
     ${requestScope.pageTool}
        </div>
</form>



我想实现点击入住获取form表单的数据的table的数据部分数据 --------------------编程问答-------------------- 打错了  是form表单的数据和table里的部分数据到a页面中显示 --------------------编程问答-------------------- form表单内容可以直接根据id或name获取。table的内容应该可以根据所在行获得,或者你直接把要用到的数据都作为update的参数啊 --------------------编程问答-------------------- 你的意思是在a页面取出form里的数据吗?可以直接取得 --------------------编程问答-------------------- 表单的数据需要是表单的标签如input,textarea
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,