how do I extract the content from this HTML elements:
<span class="woocommerce-Price-amount amount">399 <span class="woocommerce-Price-currencySymbol">USD</span>
</span>
I would like to get the price (which here is 399).
var number_price = document.querySelector(".woocommerce-Price-amount");
I gets the hole elements include parent and child HTML elements. I would like to get only the number 399 here.