Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
Range Slider causes page to go blank when parts uncommeneted
function RangeSlider() {
    var ranger = document.getElementById("ranger");
    var output = document.getElementById("output");
    var cost = document.getElementById("cost");
    // output.value = ranger.value;
    // cost.value = output.value * 10;

    // ranger.oninput = function() {
    //     output.value = this.value
    //     cost.value = output.value * 10}
    return(
        <div class="rangecontainer">
            <p class="numerichours">Hours: <span ref={output}></span></p>
            <input type="range" min="1" max="100" value="10" class="range" ref={ranger}/>
            <p class="numerictext">Estimated Cost $: <span ref={cost}></span></p>
        </div>
    )
};

I am trying to make an image range slider like on W3 schools, but rather than html/css/js in an html doc like them, I was hoping to do it in a Javascript function in my React Website. When the lines above are uncommented, the whole page goes blank.The CSS works so the problem is just in the Javascript and HTML. Any suggestions would be appreciated :D

https://www.w3schools.com/howto/howto_js_rangeslider.asp

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda