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

72
Visualizações
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 à 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