i have html code and i need to get value from <h>
element that is placed in a <li>
element so i tried the following code
<li class="product-price">
<h3> 7 406,10 dollar </h3>
<!-- close price -->
</li>
<script>
function myFunction() {
var x = document.getElementsByClassName("product-price");
alert(x.item(0).innerHTML);
}
</script>
but i am getting [https://ift.tt/2YE205L]
Aucun commentaire:
Enregistrer un commentaire