JavaScript 'Window' Examples


Open Another Page:

And the code that makes it work:
function openOcvts()
{
	window.open("http://www.ocvts.org","OCVTS",
		"toolbar,status,scrollbars,resizable,width=400,height=400");
}
<INPUT TYPE="button" VALUE="Open OCVTS Home Page" onClick="openOcvts()">
Optional properties:
toolbar[=yes|no], location[=yes|no], directories[=yes|no]
status[=yes|no], menubar[=yes|no], scrollbars[=yes|no]
resizable[=yes|no], width=#, height=#
Open Window2 Examples:

Close This Page:

And the code that makes it work:
onClick="window.close()"

And the code that makes it work:
onClick="location.reload()"
Change the Status Bar Message:

And the code that makes it work:
function statusChange()
{
window.status = "Status Bar Message Changed"
}
onClick="statusChange()"