0
I want to use my input ranger to set my colors but it's not working that's my js code please help me
<script type="text/javascript"> var input = document.querySelectorAll("input"); for (var i = 0; i < input.Lenght; i++){ input(i).addEventListener("input", function(){ var red = document.getElementById("red").value, blue = document.getElementById("green").value, green = document.getElementById("blue").value; var display = document.getElementById("display"); display.style.background = "rgb("+red+ ","+green+ ","+blue+")"; },false); }
11 Respuestas
+ 2
I can't tell much without looking at code but assuming you did everything right except that input(i) which should be input[i] instead !
+ 2
You need to link your code using "+" if you can ,I can't help much without knowing the errors and it isn't readable this way
+ 2
maxi steve you can either copy the url of the code and paste it here using those 3 dots that you may have seen when working with code or use "+" sign to insert your code
+ 2
maxi steve check the code yourself ,it's length not Lengt
And it is input[i] not input[1]
+ 2
✌️,
+ 1
I have re write the code already and it work thanks so much for your effort
0
<div class="picker">
red<input type="range" min="0" max="255" step="1" id="red" value="115">
green<input type="range" min="0" max="255" step="1" id="green" value="30">
blue<input type="range" min="0" max="255" step="1" id="blue" value="200">
<div id="display">
</div>
</div>
This is my Html but after changing it, it does not work also
0
How can i send the link of the code
0
That's my code
0
Please how can i make it work