I am trying to customize an HTML number input so that the step
value increases after a certain number then increases more after another one. For example, this is the increment pattern I am trying to achieve:
1, 2, 4, 8, 12, 16, 20, 24, 32, 48, 64, 96, 128
1 is the first increment, 2 is the next, then 4, 8, 12, and so on. I have been doing research on this, but I cannot find any example that has been done already. Not even on this site. I tried using 1,2,4,8,12,16,20,24,32,48,64,96,128
as the step
value, but it reverts to 1.
<input type="number" name="number1" min="1" max="128" step="1" value="1">
How do I write the step
value so that this can happen, or must I use JavaScript for this instead?