Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Clear checkbox and textarea onload javacript

I made a javascript code to clear checkbox and textarea when the page loads. The code works on Firefox but it does not on google chrome. Do have any idea how to change my code to be fonctional on both browsers ?

Call the the javascript function onload:

<body onload="eraseTest()">

in the page the javascript code:

<td><input type="checkbox" name="ampli" id="ampli" value="ampli" onchange="valueChanged()">Ampli?


<script type="text/javascript">

    function valueChanged(){
    if (document.getElementById('ampli').checked) 
        {document.getElementById("subnetmaskdiv").style.display = 'block';
            
    }
    else
        document.getElementById("subnetmaskdiv").style.display = 'none';
        document.getElementById("subnetmaskdiv2").style.display = 'none';
    }
</script>

<script>
//Function to reset onload comment textarea and checkbox ampli+input fields of ampli
function eraseTest(){
document.getElementById("comment").value="";
document.getElementById("ampli").checked=false;
document.getElementById("geneName").value="";
document.getElementById("AmpliGene").value="";
}
</script>

<div id="subnetmaskdiv" style="display:none;">Gene:<input type="text" name="geneName" id="geneName"/>
<br/>Valeur Ampli:<input type="text" size="3" name="AmpliGene" id="AmpliGene"/></div></td></tr>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda