Lesson 20: The Script and Its Effect



The Script

<SCRIPT LANGUAGE="JavaScript">
function openindex()
{
var OpenWindow=window.open("", "newwin", "height=300,width=300");
OpenWindow.document.write("<HTML>")
OpenWindow.document.write("<TITLE>New Window</TITLE>")
OpenWindow.document.write("<BODY BGCOLOR='00ffff'>")
OpenWindow.document.write("<CENTER>")
OpenWindow.document.write("<font size=+1> New Window</font><P>")
OpenWindow.document.write("This will open<BR> in the main window</a><p>")
OpenWindow.document.write("<P><HR WIDTH='60%'><P>")
OpenWindow.document.write("<a href='' onClick='self.close()'> This closes the window</a><p>")
OpenWindow.document.write("</CENTER>")
OpenWindow.document.write("</HTML>")
}
</SCRIPT>

 

The Script's Effect

     It's that window that popped up.

 

Back to the Index Page