Getting the Text Value in Javascript

In my current process, In the view, when the user clicks on the checkbox, it took the @Item.Extra_Item_Price and Add to the Total Price.

<div class="product__price m-t-5">
  <input class="product__price product__price--large" name="TotalPrice" value="" id="TotalPriceS" type="hidden" />
  <span class="product__price product__price--large" data-original='@Model.ProductPrice'>[email protected](model => model.ProductPrice)</span>
</div>
<div class="product-var p-tb-30">
  <div class="product-quantity product-var__item d-flex align-items-center">
    <span class="product-var__text">Quantity: </span>
    <form class="quantity-scale m-l-20">
      <div class="value-button" id="decrease" onclick="decreaseValue()">-</div>
      <input type="number" id="number" name="number" value="1" />
      <div class="value-button" id="increase" onclick="thisChecked(this)">+</div>
    </form>
  </div>
  <div>
    <h4 class="font--regular m-b-20">Add Some Extra</h4> 
    @if (Model.CustomizableFoods.Count != 0)
    { 
    foreach (var item in Model.CustomizableFoods)
    { 
    <div class="row">
      <ul class="list">
        <li class="list__item">
          <label class="label--checkbox">
            <input type="checkbox" class="checkbox" onclick="thisChecked(this)" value="@item.Extra_Item_Price"> &nbsp; &nbsp; &nbsp; @item.ExtraItem - @item.Extra_Item_Price </label>
        </li>
      </ul>
    </div> 
       }   
      }
  </div>

When the User again unchecks the checkbox it subtracts the amount added.

Here I want to do on submit, want to take the @Item.ExtraItem values that are checked in the view and assign to the Input field to sent to the controller.

Any way of doing this?

This is the Amount updating the current javascript

<script>
        function thisChecked(el) {
            var closest_price_element = $(el).closest('.product-details-box').find('span.product__price');
            var amount = parseFloat(closest_price_element.data('original')) ?? 0; //getting attr value ..

            $('.product-var input[type=checkbox]:checked').each(function () {
                amount += parseFloat($(this).val()); //loop and addiing items amt
            });
            
            closest_price_element.text('Rs.' + amount); //change value of price
            document.getElementById("TotalPriceS").value = amount;
        }

</script>