function kuaisuxuanren(x){
alert("111111111111ppppppppppppp"+x)
var xmlhttp = new XMLHttpRequest;
xmlhttp.onreadystatechange = function () {
if(xmlhttp.readyState==4){
if(xmlhttp.status==200){
var str = xmlhttp.responseText;
var obj = eval("("+str+")");
var list = obj.jsonData;
var grouplist = list["var"];
//alert(grouplist.length);
for(var i=0;i<grouplist.length;i++){
var email = grouplist[i].email;
//alert("00000000000"+email);
var name = grouplist[i].name;
var deptName = grouplist[i].deptName;
//var div = document.createElement("div");
//div.setAttribute("class", "background-color: red;");divcss
var li = document.createElement("li");
li.setAttribute("style", "margin-left:85px;height:20px;font-size:14px;");
var label = document.createElement("label");
label.setAttribute("style","width:150%;");
label.setAttribute("for","radiochoose");
label.setAttribute("id","ren");
label.setAttribute("onclick","queren()");
label.innerText = name;
var ul = document.createElement("ul");
//div.appendChild(ul);
persons.appendChild(li);
li.appendChild(label);
// alert(deptName);
}
}
}
}
var sd = sid.value;
var arr = new Array();
arr = document.getElementById(x).value.split(';');
//alert("111111111111111111gggg"+arr.length);
var keyword = arr[arr.length-1];
var url = "http://mail.ah.chinamobile.com/webmail/service/addr/user?func=addr:searchAddrUser&sid="+sd+"&rnd=0.2907288070686717,744";
var entity = "{\"total\":15,\"keyword\":\""+keyword+"\"}";
xmlhttp.open("POST",'<%=mobile_hostName%>/MobilePlatform/rest/datasource/dsInvoke.do?method=getPageData&dataSourceId=ahcmcc.mdyj.mdyj_kuaisuxuanren&sessionId=<%=session.getAttribute("sessionId")%>&sid='+sd+'&_internal_request_entity='+entity,true);
xmlhttp.send(null);
}
x参数会改变,每个x刷新一次,但是后面的值总是覆盖前面的值,怎么解决呀。。。代码如上、、