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

95
Vistas
How to target only the number of this with javascript
<span class="woocommerce-Price-amount amount">
  <bdi>
   <span class="woocommerce-Price-currencySymbol">RM</span>
   "678"
  </bdi>
</span>

How can i target only the number of this bdi without the currency simble with Javascript?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Update a child node's textContent. Depending on the currency, the index will be either 1 or 2. In your case it's 2, because the currency symbol is before the amount.

example:

document.querySelector(".woocommerce-Price-amount bdi").childNodes[2].textContent = '1000';

The index 0 is skipped because it is a node with a newline character (thanks @derprischer).

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