Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Change the content of ALL the p tags

paras=document.querySelectorAll('p');//gets ALL the elements with <p> tags
paras.forEach(para=>{
    para.innerText +=' this text was appended afterwards';
    console.log(para.innerText)
})
 
PREVIOUS NEXT
Tagged: #Change #content #ALL #tags
ADD COMMENT
Topic
Name
8+1 =