+ 1

Can i change max value through user input?

I want to change the max value of range type input on user input..

28th Apr 2018, 2:43 AM
Sachin Kumar
Sachin Kumar - avatar
8 ответов
28th Apr 2018, 5:48 AM
Jonas Schröter
Jonas Schröter - avatar
+ 1
Thank you very much. Its working.
28th Apr 2018, 7:28 AM
Sachin Kumar
Sachin Kumar - avatar
+ 1
I did it already
28th Apr 2018, 9:12 AM
Sachin Kumar
Sachin Kumar - avatar
0
Like this? I'm not sure if you are talking about something like this. https://code.sololearn.com/WR42VoaJVMsi/?ref=app
28th Apr 2018, 4:22 AM
Jonas Schröter
Jonas Schröter - avatar
0
Your code is outstanding although I can't understand it.
28th Apr 2018, 4:59 AM
Sachin Kumar
Sachin Kumar - avatar
0
So, I create a variable and assign the value of the user input to it. Then I create a for loop which has the condition that I is smaller than this input.
28th Apr 2018, 5:01 AM
Jonas Schröter
Jonas Schröter - avatar
0
Ok but tell me how could I change the value of max attribute Let me show you what do I need to change <input type="range" class="fieldB" min="0" max="50" value="25" step="1" onChange="myFunction(this.value)"> The max value that you can see is the value that I want to change on user input
28th Apr 2018, 5:39 AM
Sachin Kumar
Sachin Kumar - avatar
0
Mark the answer as best, then other people having the same problem can see it
28th Apr 2018, 7:42 AM
Jonas Schröter
Jonas Schröter - avatar