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

186
Vistas
How to monitor input in javascript

I'm developing an extension for chrome that should check input fields in a form using REGEX

To do this, I need to get an input field, I do it as follows:

let input = document.getElementById("id_input");

After that, I have to add some function that whenever there is any change in the input, it applies a Regex in the value, formatting it in real time if the user enters some invalid value.

I tried to make a sketch of this code as follows:

input.addEventListener("change", function () {
    let v = document.getElementById('search').value;
    v.replace(/world/g, "universe");
});

For some reason it's not working, I don't have as much knowledge in javascript and I don't know if the code I made is wrong or if I need to add something else to it.

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