bootstrap 3 输入组按钮,一个文本框之间的两个按钮,单击“+”按钮在文本框中添加一个,单击“-”按钮在文本框中添加一个。使用jQuery。你能帮我怎么做吗?
<div class="input-group">
<span class="input-group-btn">
<button class="btn btn-white btn-minuse" type="button">-</button>
</span>
<input type="text" class="form-control no-padding add-color text-center height-25" maxlength="3" value="0">
<span class="input-group-btn">
<button class="btn btn-red btn-pluss" type="button">+</button>
</span>
</div><!-- /input-group -->
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/bsarunmca/kv0wvgex/
请不要为按钮或文本框添加 ID,因为我从 jquery 附加这个取决于从 api 获取的 img 数量。