function goSelect() {
        var a = document.all.item("chkSel");
        if (a != null) {
            if (a.length == null) {
                if ((a.checked == true) && (a.value > '')) {
for (j=0; j<window.opener.retObj.length;j++) {
if(window.opener.retObj[j].type == "checkbox") {
if (getKeyVal(a.value,j) == "True")
window.opener.retObj[j].checked = true;
else
window.opener.retObj[j].checked = false;
}
else{
window.opener.retObj[j].value = getKeyVal(a.value,j);
}
}                    if ( window.opener.refresh == "yes" ) {
                        window.opener.frmInfo.submit();
                    }
                    window.close();
                    return;
                }
                alert('Please select record!');
            } else {
                for (i=0; i<a.length; i++) {
                    if ((a(i).checked == true) && (a(i).value > '')) {
for (j=0; j<window.opener.retObj.length;j++) {
if (window.opener.retObj[j].type == "undefined"){
window.opener.retObj[j].innerText = getKeyVal(a(i).value,j);
}
else if(window.opener.retObj[j].type == "checkbox") {
if (getKeyVal(a(i).value,j) == "True")
window.opener.retObj[j].checked = true;
else
window.opener.retObj[j].checked = false;
}
else{
window.opener.retObj[j].value = getKeyVal(a(i).value,j);
}
}                        if ( window.opener.refresh == "yes" ) {
                            window.opener.frmInfo.submit();
                        }
                        window.close();
                        return;
                    }
                }
                alert('Please select record!');
            }
        } else
        { alert('Please Select Record First'); }
    }上面这段代码如何让他与FF兼容啊

解决方案 »

  1.   

    document.all在FF里面无法识别的。LZ搜索下IE与FF的差别的文章,看着慢慢改吧。
      

  2.   

    var a = document.all.item("chkSel");
    to 
    var a = document.getElementsByName("chkSel");
      

  3.   

    window.opener.retObj[j].innerText = getKeyVal(a(i).value,j);innerText 改成 innerHTML 试试
      

  4.   

    document.all => document.getElementByIdFF 中想使用 innerText  的功能 用 textContent
      

  5.   

    window.opener.xxx  这种形式的也要改
      

  6.   

    http://blog.csdn.net/happy664618843/archive/2010/01/30/5273422.aspx参考