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

98
Visualizações
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 Respostas
Responde à pergunta

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