Is it possible the read the price using the javascript
<span id="product_price_00873">
<span itemprop="price">178.00</span>
</span>
I just want to price 178.00. I can only using javascript.
Any suggestions will be appreciated.
If you have the product element in product
and you're using a modern browser, this should work:
var price = product.querySelector('[itemprop=price]').textContent;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With