0
I’m trying to access a id
within a css class to check the amount of existing paragraphs within it. In javascript how I could do it in that case?
Example:
<div class="classe">
<div id="algo">
<p>paragrafo1</p>
<p>paragrafo2</p>
<p>paragrafo3</p>
</div>
</div>
forehead
alert(document.querySelectorAll('#algo p').length);
– Sergio