这段程序是我从网上下的,以前用没什么问题,可是现在却提示 rmopo 未定义。我第一行不就定义了吗?我估计是字符编码出现问题了。哪位高手能帮我看看到底是哪出了问题,多谢了。
<!--Combobox-->
function combobox(sobj,obj2,obj3,obj4,obj5,obj6,obj7,al_v,al_t,zhiwu,youxiang,shouji,dianhua,dizhi,bumen)
{
var rmopo = window.createPopup();
function rm(i,oct,h)
{
var i2=eval(i);
var oct=eval(oct);
var w=eval(i).offsetWidth;
var h=eval(h);
var lefter = i2.offsetLeft-1; var topper = i2.offsetHeight;
rmopo.document.body.innerHTML = oct.innerHTML;
rmopo.document.body.style.border="1px solid #3162A6";
rmopo.document.body.style.background="#F6F6F6";
rmopo.show(lefter, topper, w, h, i2);
}
loadcombobox(sobj,obj2,obj3,obj4,obj5,obj6,obj7,al_v,al_t,zhiwu,youxiang,shouji,dianhua,dizhi,bumen);
function loadcombobox(obj,obj2,obj3,obj4,obj5,obj6,obj7,al_v,al_t,zhiwu,youxiang,shouji,dianhua,dizhi,bumen)
{
var obj = eval(obj)
var obj2 = eval(obj2)
var obj3 = eval(obj3)
var obj4 = eval(obj4)
var obj5 = eval(obj5)
var obj6 = eval(obj6)
var obj7 = eval(obj7)
theListArrayV = al_v;
theListArrayT = al_t;
theListArrayZhiwu=zhiwu;
theListArrayYouxiang=youxiang;
theListArrayShouji=shouji;
theListArrayDianhua=dianhua;
theListArrayDizhi=dizhi;
theListArrayBumen=bumen;
var tempStr='<DIV id="'+obj.id+'showcombox" style="position:relative;visibility:hidden">'
+'<DIV class="ac_menu" id="'+obj.id+'ListDiv" style="FONT-SIZE: 12px; Z-INDEX: 10; POSITION: absolute;OVERFLOW-Y:auto; WIDTH:expression('+obj.offsetWidth+'-1);">'
for(var i=0;i<theListArrayV.length;i++)
tempStr+='<DIV class="ac_menuitem" onmouseover="this.style.backgroundColor=\'#D6DEEC\';" onmouseout="this.style.backgroundColor=\'\';" onclick="this.selectedflag=1;parent.document.all.'+obj.id+'.value=this.value;parent.document.all.'+obj2.id+'.value=\''+htmlEncode(theListArrayZhiwu[i])+'\';parent.document.all.'+obj3.id+'.value=\''+htmlEncode(theListArrayYouxiang[i])+'\';parent.document.all.'+obj4.id+'.value=\''+htmlEncode(theListArrayShouji[i])+'\';parent.document.all.'+obj5.id+'.value=\''+htmlEncode(theListArrayDianhua[i])+'\';parent.document.all.'+obj6.id+'.value=\''+htmlEncode(theListArrayDizhi[i])+'\';parent.document.all.'+obj7.id+'.value=\''+htmlEncode(theListArrayBumen[i])+'\';parent.document.all.'+obj.id+'.blur();" style="cursor:default;" value="'+htmlEncode(theListArrayV[i])+'" textvalue="'+htmlEncode(theListArrayT[i])+'">'+htmlEncode(theListArrayT[i])+'</DIV>';
tempStr+='</DIV></DIV>';
obj.insertAdjacentHTML("afterEnd",tempStr);
obj.onfocus=AC_OnFocus;
obj.onclick=AC_OnFocus;
obj.onblur=AC_OnBlur;
obj.onkeydown=AC_OnKeyDown;
obj.autoComplete="off";
obj.onpropertychange=AC_OnPropertyChange;
}
function AC_OnFocus(obj)
{
if(obj==null) obj=event.srcElement;
popmenu=eval(obj.id+"showcombox");
rm(obj,popmenu,130);
AC_OnPropertyChange(obj);
}
function AC_OnBlur(obj)
{
rmopo.hide();
}
function AC_OnPropertyChange(obj)
{
if(obj==null) obj=event.srcElement;
var dv = eval("rmopo.document.all['"+obj.id+"ListDiv']");
theListDiv = dv
if(theListDiv==null) return ;
var theListDivChildren=theListDiv.children;