if you add an id to the p tag you can do this easily.
Modify the HTML code:
<div id="test">
id='para'>2002
<span>Mon textespan>
div>
type=submit value="afficher p" onClick="afficherTexts()"/>
JavaScript
var value = document.getElementById('para').innerHTML;
manpreet
Best Answer
2 years ago
how to use javascript and dom technology to get the values of p and span using div childs ?? this is the code