欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

js href的用法

 更新時(shí)間:2010年05月13日 17:57:28   作者:  
關(guān)于js window.location.href location.href parent.location.href top.location.href 的用法
"window.location.href"、"location.href"是本頁面跳轉(zhuǎn)

"parent.location.href"是上一層頁面跳轉(zhuǎn)

"top.location.href"是最外層的頁面跳轉(zhuǎn)

舉例說明:

如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如果D中js這樣寫

"window.location.href"、"location.href":D頁面跳轉(zhuǎn)

"parent.location.href":C頁面跳轉(zhuǎn)

"top.location.href":A頁面跳轉(zhuǎn)

如果D頁面中有form的話,

<form>: form提交后D頁面跳轉(zhuǎn)

<form target="_blank">: form提交后彈出新頁面

<form target="_parent">: form提交后C頁面跳轉(zhuǎn)

<form target="_top"> : form提交后A頁面跳轉(zhuǎn)



關(guān)于頁面刷新,D 頁面中這樣寫:


"parent.location.reload();": C頁面刷新 (當(dāng)然,也可以使用子窗口的 opener 對象來獲得父窗口的對象:window.opener.document.location.reload(); )



"top.location.reload();": A頁面刷新

相關(guān)文章

最新評論