码迷,mamicode.com
首页 > Web开发 > 详细

js获取td下循环的input值

时间:2015-04-09 12:13:22      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:input

var value = document.getElementsByName("newQtyAdditinal");
 for(var i =0;i<value.length;i++){
  alert(value[i].value);
 }

 

<tr class="tr_toggle" style="background: #FFFF99">
       <td style="background: #FFFF99">Additinal New Qty (K pcs)<br>额外新瓶数量
       </td>
       <c:forEach items="${dto.newQtyAdditinal}" var="info"
        varStatus="s">
        <td style="text-align: right; background: #FFFF99" class="test_3"><c:set
          var="m" value="${s.index}" /> <c:choose>
          <c:when test="${s.index !=12 }">
           <input type="text" name="newQtyAdditinal" id="newQtyAdditinal2"
            <c:if test="${status==‘Completed‘ || dto.type[m]==‘AC‘ }">readonly="readonly"</c:if>
            value="<fmt:formatNumber value="${info}" type="currency" pattern="####.########"/>"
             onblur="getnewQtyAdditinal(value,${s.index})"
            style="width: 60px; height: 20px; padding: 0; margin: 0; text-align: right" />
          </c:when>
          <c:otherwise>
           <fmt:formatNumber value="${info}" type="currency"
            pattern="####.########" />
           <input type="hidden" name="newQtyAdditinal" id="newQtyAdditinal3"
            <c:if test="${status==‘Completed‘ }">readonly="readonly"</c:if>
            value="<fmt:formatNumber value="${info}" type="currency" pattern="####.########"/>"
            style="width: 60px; height: 20px; padding: 0; margin: 0; text-align: right" />
          </c:otherwise>
         </c:choose></td>
       </c:forEach>
      </tr>

本文出自 “8812323” 博客,请务必保留此出处http://8822323.blog.51cto.com/8812323/1630298

js获取td下循环的input值

标签:input

原文地址:http://8822323.blog.51cto.com/8812323/1630298

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!