Java Applets &
JavaScript
PAGE (6 of 7)

More Samples

Pop-up Window Examples
A simple window.
Create a new browser window
Create a window with contents created in a JavaScript function.
An interactive window. Type some text into the text box below prior to activating the window.

MouseOver Examples
Move the mouse over the bullet and watch the status bar across the bottom of the window.

Source

Within the body of the document

<A HREF="samples.html" 	
	onMouseOver="window.status='Mouse over bullet'; 
		return true"
	onMouseOut="window.status='';
		return true">

<img src="images/ball2.gif" border=0 height=27 width=27></a>

Move the mouse over Banner 1.

Source

Within the Header of the document

<SCRIPT language="JavaScript">
<!--
/* Change to specified image */
function ChangeImage(imgNum,imgSrc) {
       	if (newBrowser() == true){
               	document[imgNum].src = imgSrc; 
               }
       }
// -->
</SCRIPT>
Within the body of the document:
<A HREF="samples.html" 
	onMouseOver=
		"ChangeImage('samples','images/ban2.gif');
		window.status='Banner 2';
		return true"; 
	onMouseOut=
		"ChangeImage('samples','images/ban1.gif');
		window.status=' ';
		return true;">
<IMG SRC="images/ban1.gif" NAME="samples" WIDTH=250 HEIGHT=40 
	BORDER=0></A>

 


© CS Dept Va Tech, 1997-1998.

All rights reserved.