Accessing Document Contents : Timer « Development « JavaScript DHTML






Accessing Document Contents

<HTML>
<HEAD>
<TITLE>Accessing Document Contents</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function createSummary() {
 win2 = open("","window2")
 win2.document.open("text/plain")
 win2.document.writeln("Title: "+document.title)
 win2.document.writeln("Links: "+document.links.length)
 win2.document.writeln("Anchors: "+document.anchors.length)
 win2.document.writeln("Forms: "+document.forms.length)
 win2.document.writeln("Images: "+document.images.length)
 win2.document.writeln("Applets: "+document.applets.length)
 win2.document.writeln("Embeds: "+document.embeds.length)
 win2.document.close()
}
// --></SCRIPT>
</HEAD>
<BODY>
<A NAME="#top"></A>
<form>
<INPUT TYPE="BUTTON" NAME="Help" VALUE="Help"  ONCLICK="alert('Click one of the above images.')">
</FORM>
<SCRIPT LANGUAGE="JavaScript"><!--
setTimeout("createSummary()",5000);
// --></SCRIPT>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Using a Timer
2.setInterval() and clearInterval() methods
3.A Countdown Timer
4.Timer Events Demo
5.Timer Events Demo 2
6.A Timeout Processing Example