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

74
Vistas
I'm trying to create a function that shows the content only when in the prompt confirm is clicked

i'm trying to create a function that shows the site content only when after reading the prompt, the user clicks on ok or confirm. This is what i got so far. I'm using VueCLI for this! This are the errors i got: 10:1 error 'add' is not defined no-undef 14:9 error Move function declaration to function body root no-inner-declarations 14:18 error 'remove' is defined but never used no-unused-vars

Main.js:

import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

new Vue({
    render: h => h(App),
}).$mount('#app')

function validation() {
    var site = prompt("some text");
    if (site == true) {
        function remove() {
            var element = document.getElementById("app");
            element.classList.remove("none");
        }
    } else if (site == false) {
        var response = document.getElementById("response");
        response.innerHTML = "some text";
    }
}

App.vue:

<template>
  <div class="none" id="app">
    <h1 id="response"></h1>
    <HeaderComp/>
    <MainComp/>
    <FooterComp/>
  </div>
</template>

scss:

<style lang="scss">
@import "bootstrap/dist/css/bootstrap.min.css";

*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.none{
  display: none;
}

</style>
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