HTML :
<p data-schedule="end">meeting.</p>
<p data-schedule="to-do"> call product.</p>
<p data-schedule="end">visio conf.</p>
JS :
var paras = document.body.getElementsByTagName("p");
for (var i =0 ; i<paras.length ; i++) {
console.log(paras.length); // dynamique
if (paras[i].getAttribute("data-schedule") == "to-do")
paras[i].parentNode.removeChild(paras[i]);
}
Donner l'ensemble des résultats.