成人午夜激情影院,小视频免费在线观看,国产精品夜夜嗨,欧美日韩精品一区二区在线播放

當前位置:首頁>>軟件教程>>新聞內容  
子父窗口之間的操作之小例子
作者:佚名 發布時間:2004-1-14 8:41:26 | 【字體:

    用window.openr打開的子父窗口之間的操作跟框架的是不一樣的,子窗口和父窗口之間有opener來聯系。而源窗口要訪問子窗口要通過其句柄來操作。以下小例子希望能幫助新手更了解他們的操作。

test.htm  

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>子父窗口的操作</title>
</head>
<body>
<script>
var win=null;
function op(){
win=window.open("about:blank","win","width=200,height=200");
win.document.write("<input type='button' value='關閉父窗口' onclick='window.opener.opener=null;window.opener.close()'>");
win.document.write("<input type='button' value='刷新你窗口' onclick='window.opener.location.reload()'>");
}
/script>
<input onclick="op()" value="打開窗口" type="button"><input type="button" value="最小化" onclick="if(win&&win.open&&!win.closed){win.resizeTo(0,0);win.moveTo(0,window.screen.width);}else alert('還沒有打開窗口或已經關閉')">
<input type="button" value="最大化" onclick="if(win&&win.open&&!win.closed){win.moveTo(-4,-4);win.resizeTo(screen.availWidth+8,screen.availHeight+8);}else alert('還沒有打開窗口或已經關閉');">
<input type=button value="關閉子窗口" onclick="if(win&&win.open&&!win.closed){win.opener=null;win.close()}else alert('還沒有打開窗口或已關閉')">
<input type=button value="刷新子窗口" onclick="if(win&&win.open&&!win.closed){win.location.reload();win.focus()}else alert('窗口還沒有打開或已關閉')">
<input type="button" value="看子窗口的大小" onclick="if(win&&win.open&&!win.closed){alert(win.document.body.clientWidth+'*'+win.document.body.clientHeight);win.focus();}else{alert('還沒有打開窗口或者已關閉')};">
</body>
</html>


文章來源:西部E網轉
·自適應圖片大小的彈出窗口
 放生
 愚愛
 夠愛
 觸電
 白狐
 葬愛
 光榮
 畫心
 火花
 稻香
 小酒窩
 下雨天
 右手邊
 安靜了
 魔杰座
 你不像她
 邊做邊愛
 擦肩而過
 我的答鈴
 懷念過去
 等一分鐘
 放手去愛
 冰河時代
 你的承諾
 自由飛翔
 原諒我一次
 吻的太逼真
 左眼皮跳跳
 做你的愛人
 一定要愛你
 飛向別人的床
 愛上別人的人
 感動天感動地
 心在跳情在燒
 玫瑰花的葬禮
 有沒有人告訴你
 即使知道要見面
 愛上你是一個錯
 最后一次的溫柔
 愛上你是我的錯
 怎么會狠心傷害我
 不是因為寂寞才想
 親愛的那不是愛情
 難道愛一個人有錯
 寂寞的時候說愛我
主站蜘蛛池模板: 佳木斯市| 唐海县| 三台县| 余江县| 桐乡市| 金塔县| 晋中市| 柏乡县| 磴口县| 新民市| 农安县| 百色市| 安庆市| 泰顺县| 岢岚县| 郓城县| 中宁县| 青阳县| 台前县| 绥阳县| 汉阴县| 新闻| 凉山| 军事| 策勒县| 黔东| 雅安市| 兰州市| 东乡县| 忻州市| 龙陵县| 呼和浩特市| 大余县| 天全县| 旌德县| 沙洋县| 海口市| 宕昌县| 容城县| 温州市| 西乌珠穆沁旗|