test.php
复制代码代码如下:
<! Doctype html public "- // w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<adal>
<meta http-equiv = "content-lang" content = "utf-8" />
<meta http-equiv = "contenu-type" contenu = "text / html; charset = utf-8" />
<meta name = "auteur" content = "武林网 (myz)" />
<meta name = "copyright" content = "武林网 (myz)" />
<meta name = "Description" content = "" />
<meta name = "keywords" contenu = "" />
<link rel = "icon" href = "" type = "image / x-icon" />
<link rel = "icône de raccourci" href = "" type = "image / x-icon" />
<link href = "" rel = "stylesheet" type = "text / css" />
<Title> </Title>
<script type = "text / javascript">
<! -
fonction winopen ()
{
window.open ("test2.php", "", "hauteur = 400, largeur = 400");
}
->
</cript>
</ head>
<body>
<textArea id = "text1" name = "text1"> </ textarea>
<input type = "Button" value = "soumi" name = "soumi" onclick = "javascript: winopen ();" />
</docy>
</html>
</docy>
</html>
test2.php
复制代码代码如下:
<! Doctype html public "- // w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<adal>
<meta http-equiv = "content-lang" content = "utf-8" />
<meta http-equiv = "contenu-type" contenu = "text / html; charset = utf-8" />
<meta name = "auteur" content = "武林网 (myz)" />
<meta name = "copyright" content = "武林网 (myz)" />
<meta name = "Description" content = "" />
<meta name = "keywords" contenu = "" />
<link rel = "icon" href = "" type = "image / x-icon" />
<link rel = "icône de raccourci" href = "" type = "image / x-icon" />
<link href = "" rel = "stylesheet" type = "text / css" />
<Title> </Title>
<script type = "text / javascript">
<! -
fonction winback ()
{
if (window.opener) {
fwindowText1 = window.opener.document.getElementById ("text1");
fwindowText1.value = fwindowText1.value + "Mayongzhan";
window.close ();
}
}
->
</cript>
</ head>
<body>
<input type = "bouton" name = "back" value = "back" onclick = "javascript: winback ();" />
</docy>
</html>
window.oupen 详解
window.open ("Surl", "Sname", "Sfeature", "Breplace");
Surl: 可选项。字符串 (String) 。指定要被加载的 Html 文档的 URL 地址。假如无指定值 , 则 À propos: Blank 的新窗口会被显示。
Sname: 可选项。字符串 (String) 。指定打开的窗口的名字。这个名字可以用于 Form 或 A 对象的 Target 属性。此名字也可以使用下列通用名称: _media: ie6.0 在浏览器左边的媒体面板内打开 Surl。
_blanque: 在新窗口中打开 Surl。
_parent: 在当前框架的父框架内打开。假如当前框架无父框架 , 此参数值等同于 _self。
_Search: ie5.0 在浏览器左边的搜索面板内打开 Surl。
_self: Surl 在当前窗口中打开 , 覆盖当前文档。
_top: 在所有框架之外的最顶层窗口中打开 Surl 。假如当前窗口无框架结构 , 此参数值等同于 _self。
Sfeatures: 可选项。字符串 (String) 。指定窗口装饰样式。使用下面的值。多个之间用逗号隔开。只有当新的浏览器窗口被建立时 , 此参数的设置才会发生作用。 channelMode = {oui | non | 1 | 0} 指定是否将窗口显示为频道模式。默认值为 non。
répertoires = {oui | non | 1 | 0} 指定是否显示「链接」按钮。默认值为 oui。
plein écran = {oui | non | 1 | 0} 指定是否以全屏方式显示窗口。默认值为 non 。要小心使用全屏模式 , 因为这种模式会隐藏浏览器窗口的标题栏和菜单。如果没有在页面内提供关闭窗口的功能 , 用户可以使用 alt + f4 快捷键关闭窗口。
hauteur = nombre 设置窗口的高度。最小值为 100。
gauche = nombre 设置窗口左上角相对于桌面的横坐标。单位为像素 (px)。
largeur = nombre 设置窗口的宽度。最小值为 100。
top = nombre 设置窗口左上角相对于桌面的纵坐标。单位为像素 (px)。
emplacement = {oui | non | 1 | 0} 设置是否显示浏览器窗口的地址栏。默认值为 oui。
menuBar = {oui | non | 1 | 0} 设置是否显示浏览器窗口的菜单栏。默认值为 Oui。
résidable = {oui | non | 1 | 0} 设置窗口是否允许被用户改变尺寸。默认值为 Oui。
Scrollbars = {Oui | Non | 1 | 0} 设置窗口是否可以具有滚动条。默认值为 OUI。
status = {oui | non | 1 | 0} 设置是否显示浏览器窗口的状态栏。默认值为 Oui。
titlebar = {oui | non | 1 | 0} 设置是否显示浏览器窗口的标题栏。除非调用程序是 html 应用程式 (hta) 或被信任的对话框 , 否则此参数将被忽略。默认值为 oui。 barre d'outils = {oui | non | 1 | 0} 设置是否显示浏览器窗口的工具条。默认值为 Oui。
Breple: 可选项。布尔值 (booléen) 。false | True。false: 新打开的文档覆盖历史列表里的当前文档。True: 文新打开的文档被简单的添加到历史列表的最后。
:
Onewindow: 对象 (élément) 。返回对新的 Fenêtre 对象的引用。
:
打开新窗口并载入 Surl 指定的 html 文档。默认情况下 , 此方法建立的新窗口具有默认的高度、宽度 , 以及菜单、工具条等。您可以使用 sfeatures 参数改变它们的设置。
当 sfeatures 参数被指定时 , 没有在参数值的列表中出现的装饰样式都会被自动设置为 non。
IE5 + 中允许控制打开的窗口的标题栏。通过在被信任的程序像 Microsoft? VisualBasic 或者 HTML 应用程式 (HTA) 中打开窗口可以关闭标题栏。他们是可信任的因为他们使用 Microsoft? InternetExplorer 作为浏览器接口。
当文档内的对象上的事件 (événement) 激发的函数调用 Ouvert 方法时 , fenêtre 对象的 Ouvert 方法被使用。而当文档内的对象上的事件 (événement) 直接使用 Ouvert 方法时 , Document 对象的 Ouvert 方法被使用。