首页 > 解决方案 > 如何在提交之前获取输入类型编号的值

问题描述

我需要相对于添加的数量增加产品率 qith ..(在角度 11 中)

编码 ,

  <h2>Price: {{price}}</h2> // like {{price*input.value}}
      <h2> Quantity : <div class="number-input">
        <button onclick="this.parentNode.querySelector('input[type=number]').stepDown()" >-</button>
        <input class="quantity" min="0" max="25" name="quantity" value="1" type="number">
        <button onclick="this.parentNode.querySelector('input[type=number]').stepUp()" class="plus">+</button>
      </div>
    </h2>
    </div>

标签: javascripthtmlangulardata-binding

解决方案


推荐阅读