我有輸入是數字我怎麼能總結它的值?結果會影響到一個新的變量,最終會保存到我的數據庫中。AngularJS:總和輸入值
這裏是我輸入:
<div class="panel panel-primary">
<div class="panel-heading">Revenus mensuels</div>
<div class="panel panel-body">
<div class="form-group col-md-8">
<label class="control-label col-md-6"> Revenus nets</label>
<div class="input-group">
<input id="ch1" type="number" required="required" class="form-control" placeholder="Charges de residence" aria-describedby="basic-addon2" />
<span class="input-group-addon" >€</span>
\t \t \t </div>
</div>
<div class="form-group col-md-8">
<label class="control-label col-md-6">Allocation familiale</label>
<div class="input-group">
<input id="ch1" type="number" required="required" class="form-control" placeholder="Charges de residence" aria-describedby="basic-addon2" />
<span class="input-group-addon" >€</span>
\t \t \t </div>
</div>
<div class="form-group col-md-8">
<label class="control-label col-md-6">Autres apports</label>
<div class="input-group">
<input id="ch1" type="number" required="required" class="form-control" placeholder="Charges de residence" aria-describedby="basic-addon2" />
<span class="input-group-addon" >€</span>
\t \t \t </div>
</div>
</div></div>
新的變量是我想要顯示它的價值標籤。
我想,總,在我的數據庫中添加,當我提交表單。不只是顯示它。 –