javascript - 如何在提交之前获取输入类型编号的值
问题描述
我需要相对于添加的数量增加产品率 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>
解决方案
推荐阅读
- mobile - 如何在 UWP 中将 Grid.Background 设置为 MediaPlayer?
- java - 返回类型泛型
- ios - 通过字符串 Xcode 标识符访问 UILabel
- cakephp - Cakephp 3.6 - 没有 mod_rewrite 的服务器上的 Auth 组件
- android - 打开带有地址和金额的比特币钱包的正确链接是什么?
- php - 如何处理向 Worker SQS [AWS] 发送消息的任务
- javascript - 从 iframe 内部想要获取所有 iframe 类名(每个 iframe 有不同的类名)
- javascript - 在反应中将数据添加到字典中
- docker - 适用于 Windows 的 Docker 桌面 - 无法提取图像
- json - Postgres:使用给定的键集和默认值创建 jsonb 对象