国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
js刷新iframe并給iframe中的控件賦值
<iframe name="frm" id="frm"  frameborder=0 height="0" scrolling="no" style="visibility:hidden"></iframe>
需要iframe生效的時候,給frm指定對應(yīng)的頁面則該頁面會被調(diào)用
eg:
document.getElementById("frm").src="xxxxx.asp?grp="+group+ "&ord="+order;
被調(diào)用界面可以通過Request.QueryString("ord")來取值。
另,也可以通過document.frames['frm'].document.getElementById('xxxx').value這種方式給iframe里的控件賦值
eg:
document.frames['frmmedia'].document.getElementById('player').URL = 'D:/test.mp3';
下面是網(wǎng)上路過的資料,瞄一眼~
iframe父窗口刷新子窗口 和子窗口刷新父窗口的js
function reloadleft(){
var leftiframeid = document.getElementById('left');//left為對應(yīng)iframe的id
leftiframeid.src = "left.html";//ileft.html為frame的頁面
}
鏈接里面加入onclick="reloadleft()"就可以了。
<a href="contact.html" target="main" title="點擊查看" onclick="reloadleft()">聯(lián)系我們</a>
跳轉(zhuǎn)頁面的js:window.location.href="new.html"
------------------------
下面是搜集的子窗口刷新父窗口的js
self.opener.location.reload();
window.opener.location.reload(); //關(guān)鍵是這句:刷新父窗口
------------------------
Web開發(fā)中適當運用一些彈出子窗口有很多好處,可以節(jié)省頁面設(shè)計代價,獲得好的用戶體驗,在最近項目開發(fā)中我遇到了幾個父子窗口的問題,現(xiàn)在整理給大家,希望有所幫助.
情景一: 打開某一子窗口, 子窗口中任一按鈕點擊時候不能彈出新頁面,進行完操作后,關(guān)閉該子窗口,刷新父窗口.
1: 頁面A:父窗口,其中有一個打開子窗口的鏈接,<a href="#"onclick="open()">頁面C</a>
A中有如下js代碼:
<script language="JavaScript">
   function open()
    {
      window.showModalDialog("頁面B");
    }
</script>
2: 頁面B,此為中間頁,起過渡作用
B html 代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>**</title>
</head>
<frameset rows="0,*">
<frame src="about:blank">
<frame src="頁面C">
</frameset><noframes></noframes>
</html>
3:頁面C ,要打開的子窗口.
它關(guān)閉時候刷新父窗口很簡單,只要把A中
<a href="#"onclick="open()">頁面C</a> 改為
<a href="頁面A"onclick="open()">頁面C</a>
2: 頁面B,要打開的子窗口,關(guān)閉時候觸發(fā)window.opener.location.reload();window.close();即可刷新父窗口并且關(guān)閉子窗口.
情景三:打開某一子窗口,    讓用戶選擇要添加的東東,譬如要添加到文章里的相片選擇后關(guān)閉子窗口,然后選擇的東東出現(xiàn)在父窗口里.
在下圖中,我點擊"添加照片"鏈接然后彈出子窗口,在子窗口中選擇后點擊"添加照片"按鈕,子窗口自動關(guān)閉,并且父窗口"已添加照片:"下面列出了我選擇的照片。
原文地址:
JS實現(xiàn)刷新iframe的方法作者:蘇默
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe>
方案一:用iframe的name屬性定位
<input type="button" name="Button" value="Button"
onclick="document.frames('ifrmname').location.reload()">
<input type="button" name="Button" value="Button"
onclick="document.all.ifrmname.document.location.reload()">
方案二:用iframe的id屬性定位
<input type="button" name="Button" value="Button"
onclick="ifrmid.window.location.reload()">
終極方案:當iframe的src為其它網(wǎng)站地址(跨域操作時)
<input type="button" name="Button" value="Button"
onclick="window.open(document.all.ifrmname.src,'ifrmname','')">
總結(jié)JavaScript(Iframe、window.open、window.showModalDialog)父窗口與子窗口之間的操作
http://www.04js.cn/content.asp?id=1233
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
JS實現(xiàn)刷新iframe的方法
js與php數(shù)據(jù)交互,無刷新上傳及顯示,跨域傳參
js頁面跳轉(zhuǎn)和js對iframe進行頁面跳轉(zhuǎn)、刷新
js實現(xiàn)網(wǎng)頁防止被iframe框架嵌套及幾種location.href的區(qū)別
源碼
用jquery 刷新 重新加載頁面
更多類似文章 >>
生活服務(wù)
分享 收藏 導長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服