The price value dont appears with "$"

The price value dont appears with "$"


I have this code so when the user introduces for example "10" it appears 10,00 in the price field:

  1. document.getElementById("show_price").onblur = function () {
  2.       var $price = document.getElementById("registration_type_price");
  3.       $price.value = this.value;
  4.       this.value = parseFloat(this.value.replace(/,|\$/g, ""))
  5.           .toFixed(2)
  6.           .toString()
  7.           .replace(/\B(?=(\d{3})+(?!\d))/g, ".");
  8.   }

But I would like to show also the $, like 10,00$. Do you know how to achieve that?

The input is like this:

  1. <div class="form-group col-md-6">
  2.     <label for="registration_type_price">Price</label>
  3.     <input type="hidden" name="registration_type_price" id="registration_type_price"/>
  4.     <input type="number"
  5.            onkeydown="javascript: return event.keyCode == 69 ? false : true"
  6.            min="0" step="any"
  7.            class="form-control"
  8.            value="{{ old('registration_type_price', '0.00') }}"
  9.            name="show_price" id="show_price" placeholder="Price (Ex: 15,00)"/>
  10. </div>