1、关于Frame的获取问题
try {
var sel = window.parent.parent.frames["Frame1"].frames["left1_top"].document.getElementById(‘Selectaa‘);
var lbl = window.parent.parent.frames["topFrame"].document.getElementById(‘lblSection‘);
}
catch(e)
{}
if (sel == null) {
try {
sel = window.parent.parent.frames["Frame1"].contentDocument.getElementById(‘left1_top‘).contentDocument.getElementById(‘Selectaa‘);
lbl = window.parent.parent.frames["topFrame"].document.getElementById(‘lblSection‘);
} catch(e)
{}
}
2、fireEvent不兼容问题
function onchangeea(value) {
// var sel =window.parent.parent.main.document.getElementById(‘Select11‘);
var sel =window.parent.parent.frames[‘main‘].document.getElementById(‘Select11‘);
if (sel != null) {
sel.options[0].text = value;
sel.value = value;
//sel.fireEvent(‘onchange‘);
if (sel.fireEvent)
sel.fireEvent("onchange")
else
sel.onchange()
}
}
3,窗口关闭问题
window.parent.open("about:blank", "_self").close();
原文地址:https://www.cnblogs.com/cinemaparadiso/p/10320887.html