Below is the HTML code snippet I am working with:
<div id='content'>
<div id='price'>$100</div>
<div id='another'>something</div>
</div>
I am able to extract content from the element with id="content" using the following code:
vl = document.getElementById("content").value;
Within this "content" id, there is another element with id="price"
. However, I am unable to directly retrieve the content of id="price".
Can you guide me on how to access the content from id="price" through the use of id='content'
? Your assistance is appreciated. Thank you.