按下按扭定位打开新窗口
源代码:
<HTML>
<HEAD>
<TITLE>Window Position</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function openZero() {
zero=open("","zero","height=175,width=175,status=no,toolbar=no,directories=no,
menubar=no,location=no,resizable=no,left=0,top=0");
zero.document.write("<html><title>Windows!</title>"
+ "<body bgcolor='white' onblur=window.close()>"
+ "<b><a href='javascript:window.close()'>距左上角0像素窗口:<br>"
+ "点击此处自动关闭</a></b> "
+ "</body></html><p>");
}
function openHundred() {
one=open("","one","height=175,width=175,status=no,toolbar=no,directories=no,
menubar=no,location=no,resizable=no,left=100,top=100");
one.document.write("<html><title>Windows!</title>"
+ "<body bgcolor='white' onblur=window.close()>"
+ "<b><a href='javascript:window.close()'>距左上角100像素窗口:<br>"
+ "点击此处自动关闭</a></b> "
+ "</body></html><p>");
}
function openTwohundred() {
two=open("","two","height=175,width=175,status=no,toolbar=no,directories=no,
menubar=no,location=no,resizable=no,left=200,top=200");
two.document.write("<html><title>Windows!</title>"
+ "<body bgcolor='white' onblur=window.close()>"
+ "<b><a href='javascript:window.close()'>距左上角200像素窗口:<br>"
+ "点击此处自动关闭</a></b> "
+ "</body></html><p>");
}
function openThreehundred() {
three=open("","three","height=175,width=175,status=no,toolbar=no,directories=no,
menubar=no,location=no,resizable=no,left=300,top=300");
three.document.write("<html><title>Windows!</title>"
+ "<body bgcolor='white' onblur=window.close()>"
+ "<b><a href='javascript:window.close()'>距左上角300像素窗口:<br>"
+ "点击此处自动关闭</a></b> "
+ "</body></html><p>");
}
// End -->
</script>
</HEAD>
<BODY BGCOLOR=#ffffff vlink=#0000ff>
<P>
<center>
<form>
<input type="button" value="距左上角0像素窗口"
onclick="openZero()"><br>
<input type="button" value="距左上角100像素窗口"
onclick="openHundred()"><br>
<input type="button" value="距左上角200像素窗口"
onclick="openTwohundred()"><br>
<input type="button" value="距左上角300像素窗口"
onclick="openThreehundred()"><br>
</form>
<P>
</center>