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

202
Visualizações
How do I hide specific values of a button?

I have an app that generates Bootstrap buttons that hold these sensetive values: data-value1="100" data-value2="I love you mamma" as seen in my following code.

<button id="button-0" class="btn btn-sm btn-primary" onclick="fetchValue(this)" data-value1="100" data-value2="I love you mamma">100</button>

I would like to keep these values hidden from unauthorized users, however, one is able to see these sensitive values when you click on it to inspect it via a browser like chrome. Is there a way I can hide these values while the button still holds these values?

Ideally, the following code is what I would like the user who clicks on the button to inspect it to see:

<button id="button-0" class="btn btn-sm btn-primary" onclick="fetchValue(this)">100</button>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Javascript is running on your client side, so I don't think this is actually possible.

Anything that you need to be kept secret is going to need to be server side, ideally send it from your Controller to the client side.

about 4 years ago · Juan Pablo Isaza Relatório
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