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

201
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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