Is there any smart, minimalistic way to always show the prefix (positive, negative) of a number in a HMTL input field? (e.g. +1, 0, -1)
I have only found s solution for PHP: How to prefix a positive number with plus sign in PHP
I have to use <input type="text">
since there are different implementations for text=number
in different browsers: Localization of input type number
Why am I doing this? I have an input field that shows the percentage that can be added (or subtracted) to a certain value.
Basevalue: 10
Mofification %: +10
Results: 11