Sunday, 15 July 2012
How to Change HTML elements with JavaScript
<!DOCTYPE html>
<html>
<body>
<h1>Web Page</h1>
<p id="demo">A Paragraph.</p>
<script type="text/javascript">
document.getElementById("demo").innerHTML="My First JavaScript";
</script>
</body>
</html>
Result:
Web Page
My First JavaScript
This post was written by: Bharathi
Bharthi is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “How to Change HTML elements with JavaScript”
Post a Comment