g***@163.com
g***@163.com
  • 发布:2018-01-02 01:09
  • 更新:2018-07-24 15:24
  • 阅读:2908

动态获取mui-number值

分类:MUI
<li class="mui-table-view-cell">  
<li class="mui-table-view-cell">  
                        <div class="mui-input-row mui-checkbox mui-left">  
                            <input name="checkbox" id="1002.001" price="1000" class="listCheckBox" type="checkbox" value="true">  
                            <div class="rihgtcontent">  
                                半片(大包装)  
                                <p>  
                                    标准价格:20.5  
                                </p>  
                                <div class="mui-row">  
                                    <div class="mui-col-sm-4 mui-col-xs-4">  
                                        销售价格  
                                    </div>  
                                    <div class="mui-col-sm-8 mui-col-xs-8">  
                                        <div class="mui-numbox" data-numbox-min='1'>  
                                            <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>  
                                            <input class="mui-numbox-input" type="number" value="1" />  
                                            <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>  
                                        </div>  
                                    </div>  
                                </div>  
                                <div class="mui-row">  
                                    <div class="mui-col-sm-4 mui-col-xs-4">  
                                        数量  
                                    </div>  
                                    <div class="mui-col-sm-8 mui-col-xs-8">  
                                        <div class="mui-numbox" data-numbox-min='1'>  
                                            <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>  
                                            <input class="mui-numbox-input" type="number" value="1" />  
                                            <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>  
                                        </div>  
                                    </div>  
                                </div>  
                            </div>  
                        </div>  
                    </li>  
    </li>

上面的代码是通过程序自动生成,会有多行li
js中怎么 动态获取 每行的 mui-numbox的数值呢 ?

2018-01-02 01:09 负责人:无 分享
已邀请:
8***@qq.com

8***@qq.com

//购物车中复选框  
var items=document.getElementsByClassName('itemSelect');  
//获得每个item的数量  
num=items[j].parentNode.children[3].children[1].value;

该问题目前已经被锁定, 无法添加新回复