Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change text in javascript

const app = document.getElementById('app');

const change_app_text = (text) => app.innerText = text;

change_app_text('Text you want');
console.log(app.innerHtml) // =>  <div id="app">Text you want</div>
Source by w3schools.com #
 
PREVIOUS NEXT
Tagged: #change #text #javascript
ADD COMMENT
Topic
Name
1+5 =