【发布时间】:2018-04-04 07:08:17
【问题描述】:
我有三个输入数字:
<input min="0" name="cat1" step="1" type="number" max="50" value="0" />
<input min="0" name="cat2" step="1" type="number" max="50" value="0" />
<input min="0" name="cat3" step="1" type="number" max="50" value="0" />
目前最大值为 50。我希望所有三个加起来的最大值也为 50。
如何使用 javascript 或 jquery 解决这个问题?
【问题讨论】:
-
I would like the max for all three together to be 50 aswell什么? -
我相信 TS 意味着所有三个加起来的 sum 也不应该超过 50。
标签: javascript jquery html input numbers