Accessing Document Contents : Timer : Development : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
PHP
JavaScript DHTML Home »  Development   » [  Timer  ]   
 



Accessing Document Contents

Please note that some example is only working under IE or Firefox.


/*
Mastering JavaScript, Premium Edition
by James Jaworski 

ISBN:078212819X
Publisher Sybex CopyRight 2001
*/
<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.  Count down timer
2.  Using a Timer
3.  setInterval() and clearInterval() methods
4.  A Countdown Timer
5.  Timer Events Demo
6.  Timer Events Demo 2
7.  A Timeout Processing Example
8.  Using the const Keyword
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.