dynamically changing HTML tag

Is there a way to dynamically update an HTML tag?

The HTML tag I have is:

<p id=something>hello</p>

Is there a way through JavaScript that I can change hello to another value.

What is the best way to go about changing that value?

Answers:

Answer
document.getElementById("something").innerHTML = 'Something New';

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.