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

184
Vistas
Pass variable reffering another variable

I have this code in a HTML page. I want to pass the variable to the function and the function to use it with the hostname variable.


   <script> var hostname = ["host","url1","url2","url3"]; </script>
 [...]
   <script>
function stopvm(param) {
    console.log(param[1])
    var _url = param[1];
    $.ajax({
        type: 'POST',
        url: _url
    });
}
</script>
<button onclick="stopvm('hostname')">Stop</button>

Is this possible?

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