How to write normal text code using JavaScript dynamically?


The innerText property is used to write the simple text using JavaScript dynamically. Let’s see a simple example:

document.getElementById('mylocation').innerText="This is text using JavaScript";   

Leave a Reply

Your email address will not be published. Required fields are marked *