alwaysLowered=yes|no | yes, , . |
alwaysRaised=yes|no | yes, , . |
channelmode=yes|no | yes, ( " "). |
dependent=yes|no | yes, , .. . |
directories=yes|no | Navigator, . |
fullscreen=yes|no | yes, ( " "). |
height={} | . |
hotkeys=yes|no | no, "" . |
innerHeight={} | . |
innerWidth={} | . |
left={X} | . |
location=yes|no | , , . |
menubar=yes|no | . |
outerHeight={} | ( , , ) . |
outerWidth={} | . |
replace=yes|no | yes, , , , . |
resizable=yes|no | . |
screenX={X} | , left |
screenY={Y} | , top |
scrollbars=yes|no | . |
status=yes|no | . |
titlebar=yes|no | . |
toolbar=yes|no | . |
top={Y} | . |
width={} | . |
z-lock=yes|no | yes, , . |
yes no 1 0, - yes, - no.
window.open() .
<!-- pr20: -->
<html>
<head>
<title>window.closed Property</title>
<script type="text/javascript">
|
|
var newWind; //
function newWindow() {
newWind = window.open("","subwindow","height=100,width=50");
setTimeout("finNewWindow()", 100);
}
function finNewWindow() {
var str = "";
str += "<html><body><h1> </h1>";
str += "<form><input type='button' value=' '";
str +="onclick='window.opener.close()'> </form></body></html>";
newWind.document.write(str);
newWind.document.close();
}
function closeWindow() { // close subwindow
if (newWind &&!newWind.closed) {
newWind.close();
}
}
</script>
</head>
<body>
<form>
<input type="button" value=" "
onclick="newWindow()" /><br />
<input type="button" value=" "
onclick="closeWindow()" />
</form>
</body>
</html>
<!-- pr21: -->
<html>
<head>
<title> #1 HTML </title>
<script type="text/javascript">
{//
function openStaticWin()
window.open("test21.htm", "_blank",
"height=500, width=600,status=yes,location=no, resizable=yes ");
document.bgColor ='ff0000'}
function openDynamicWin() { // HTML- .
var newWin = window.open();
newWin.document.open();
newWin.document.write("<html><head></head><body>"
+ new Date() + "</body></html>");
newWin.document.close();
}
</script>
</head>
<body>
<form name="form2">
<input type="button" name="button1" value="openStaticWin"
onclick="openStaticWin();">
<input type="button" name="button2" value="openDynamicWin"
onclick="openDynamicWin();">
</form>
</body>
</html>
<!-- test # 21: HTML -->
<html>
<head>
<title> Test Window #2 </title>
<form name=form1>
<input type="button" name="button3" value="close"
onclick="window.close();">
</form>
</head>
<body >
</body></html>
<!-- pr22: -->
<html>
<head>
<title>Extract pathname</title>
<script type="text/javascript">
// function to extract URL of current directory
function getDirPath(URL) {
var result=unecape(URL.substring(0,(URL.lastIndexOf("/"))+ 1));
return result;
}
// passing work onto general purpose function
function showDirPath(URL) {
alert(getDirPath(URL));
}
</script>
</head>
<body>
<form>
<input type="button" value="View directory URL"
onclick="showDirPath(window.location.href)" />
</form>
</body>
|
|
</html>