How to make HTML IFrames talk to 开发者_JAVA百科each other? So I have 2 Iframes I know and create thare contents. I need to make tham talk one to other - for example one to send XML data to other or just call JS function from it.
This method requires each frame to have these functions.
function acceptXml(xml) {
// Process XML
}
function sendXml(frameName, xml) {
var frame = window.parent.frames[frameName];
frame.acceptXml(xml);
}
It could be just a starting point, but this site proposes a demo on how to do just that with some ajax.
精彩评论