Dynamic contents using Javascript...

HTML Code:

12)

<html>
<head><h1><center><font color="green">**********DYNAMIC CONTENT PROPERTIES**********</font></h1>
<title>dynamic content</title>
<script>
function changehtml()
{
document.all.atag.innerHTML="Flowers are <u>beautiful</u>";
document.all.btag.outerHTML="Flowers are <u>beautiful</u>";
document.all.ctag.innerHTML="Flowers are <u>beautiful</u>";
document.all.dtag.outerHTML="Flowers are <u>beautiful</u>";
}
</script>
</head>
<body onLoad="changehtml()" bgcolor="pink">
<h2><u><font color="blue">innerHTML</font></u></h2>
<h2 id="atag" style="color:red">outerHTML</h2><br>
<h2><u><font color="black">innerHTML</font></u></h2>
<h2 id="btag" style="color:orange">outerHTML</h2><br>
<h2><u><font color="darkred">innerHTML</font></u></h2>
<h2 id="ctag" style="color:yellow">outerHTML</h2><br>
<h2><u><font color="navy">innerHTML</font></u></h2>
<h2 id="dtag" style="color:plum">outerHTML</h2><br>
</body>
</html>

OUTPUT:





Comments

POPULAR POSTS

POPULAR POSTS