例 1。4。1(open&closeIEFF。html)
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4。0 Transitional//EN”>
<!——
function choice()
{
/* -
- aNewWindow = open()
- aNewWindow = open(aURL)
- aNewWindow = open(aURL, aName)
- aNewWindow = open(aURL, aName, aFeatureList)
*/
window。open(“cla。html”);
}
//——>
cla。html
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4。0 Transitional//EN”>
<!——
function returnV(t)
{
/*
Window。opener (Property)
A reference to the window that contained the link that opened this one。
*/
window。opener。document。form1。cla。value=t。value;
/* Window。close() (Method)
This will close the window。
JavaScript syntax: - close()
- myWindow。close()
The method window。close() will attempt to close the window in which the script is executing。
*/
close();
}
//——>
篇幅有限更多請見擴充套件連結:http://www。mark-to-win。com/tutorial/js_5_openclose。html
「連結」