Question:
使用javascript 在不同的浏览器间交换数据
Answer& Example:
Hi,
Do it in this way:
<script language="javascript" type="text/javascript">
var childWindow; // a reference hold child window object
function openChildWindow(){ //call this function to open a child window
childWindow=window.open("child.htm"); // create a simple htm page have a node <div id="textHolder">aaaa</div>
}
function changeChildWindow(){ // call this function to change the value of child window.
var divObject=childWindow.document.getElementById("textHolder");
divObject.childNodes[0].nodeValue="bbbb"; //change from "aaaa" to "bbbb"
alert(divObject.childNodes[0].nodeValue);
}
</script>
hope this helps, if there is any thing unclear, please update here.
Thanks
http://forums.asp.net/t/1365011.aspx