关于options为空或不是对象
做了一个无刷新联动,本来用两个DropDownList,很成功,后来因为需要将其中一个DropDownList改为了CheckBoxList,就一直报 "options为空或不是对象 "的错~
<script language= "javascript " type= "text/jscript ">
function load(MC_ID)
{
var drp2 = document.getElementById( "CheckBoxList1 ");
function RemoveAll(oElem)
{
var i = 0;
for (i = oElem.length; i > = 0; i--)
{
oElem.options.remove(i);
}
}
RemoveAll(drp2)
var oHttpReq = new ActiveXObject( "MSXML2.XMLHTTP ");
var oDoc = new ActiveXObject( "Microsoft.XMLDOM ");
oHttpReq.open( "POST ", "DropChild.aspx?ClassID= "+MC_ID, false);
oHttpReq.send( " ");
result = oHttpReq.responseText;
oDoc.loadXML(result);
items1 = oDoc.selectNodes( "//Table/MC_Name ");
items2 = oDoc.selectNodes( "//Table/MC_ID ");
var itemsLength=items1.length;
alert(itemsLength);
for(i=0;i <itemsLength;i++) &nb