为了账号安全,请及时绑定邮箱和手机立即绑定

在 ASP.NET CORE MVC 上使用 JavaScript 显示运行总数

在 ASP.NET CORE MVC 上使用 JavaScript 显示运行总数

斯蒂芬大帝 2021-10-29 10:38:22
我想在不重新加载页面的情况下选中 Select 复选框时显示 Credit Amount 列的运行总计。在这种情况下(见下图),运行总计应打印出 38。贷方金额列是可编辑的,因此应根据用户输入相应地更新总金额。 到目前为止我的看法<table class="gridtable">        <tr>            <th>Select</th>            <th>Submit Purchase Item Status Id</th>            <th style="display:none;">Cart Order Id</th>            <th>Customer Number</th>            <th>Customer Name</th>            <th>Serial Number</th>            <th>Charged Amount</th>            <th>Credit Amount</th>            <th>State Tax</th>            <th>Credit Tax</th>            <th>Billing Start Date</th>            <th>Billing End Date</th>            <th>Invoice Number</th>            <th>Invoice Date</th>            <th style="display:none;">Cart Billable Item Id</th>            <th>Quality</th>        </tr>        @for (int i = 0; i < Model.Count; i++)        {            <tr>                <td>                    @Html.EditorFor(model => model[i].Selected)                </td>                <td>                    @Html.DisplayFor(model => model[i].SubmitPurchaseItemStatusId)                    @Html.HiddenFor(model => model[i].SubmitPurchaseItemStatusId)                </td>                <td style="display:none;">                    @Html.HiddenFor(model => model[i].CartOrderId)                </td>                <td>                    @Html.DisplayFor(model => model[i].Custnmbr)                    @Html.HiddenFor(model => model[i].Custnmbr)                </td>                <td>                    @Html.DisplayFor(model => model[i].Custname)                    @Html.HiddenFor(model => model[i].Custname)                </td>                <td>                    @Html.DisplayFor(model => model[i].Serltnum)                    @Html.HiddenFor(model => model[i].Serltnum)                </td>
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 220 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信