ホームページ面子ページの伝値まとめ
2295 ワード
1、showModalDialog
returnValue javascript html window , , window.showModalDialog IE ,
var sonValue=window.showModalDialog("son.jsp");
window.returnValue=" ";
( ) var obj = new Object();
obj=" "
var sonValue=window.showModalDialog("son.jsp",obj);
( )
var obj = window.dialogArguments
alert(" :" + obj)
2、open
window.opener, window.open
window.open("son.jsp");
window.opener.document.getElementById("username").value
。getNewLinkValue
window.opener.getNewLinkValue(document.getElementById("tt").value);
3、iframe
//
iframe_name.iframe_document_object.object_attribute = attribute_value
:onClick="iframe_text.myH1.innerText='http://www.pint.com';"
parent_document_object.object_attribute = attribute_value
:onclick="parent.myH1.innerText='http://www.pint.com';"
IE , firefox 。 firefox ,
window.frames["iframe_name"].document.getElementById("iframe_document_object"-).object_attribute = attribute_value
window.frames["iframe_text"].document.getElementById("myH1").innerHTML= "http://www.pint.com";
parent.document.getElementById("parent_document_object").object_attribute = attribute_value
parent.document.getElementById("myH1").innerHTML = "http://www.adsf.com";
//
<IFRAME name="floater" src="iframSon.jsp" width=1000 height=600 hspace=20 vspace=20 align=right frameborder=1>
</IFRAME><BR>
window.frames["floater"].document.getElementById("sonId").innerHTML=" ";
parent.document.getElementById("parentId").innerHTML=" ";
parent.parentId.innerHTML=" ";