现在在做个联动的功能,不需要刷新整张页面,只要刷新新被联动的值,代码如下: 
  <layout:select key="Commodity : " styleClass="LABEL" property="ivitemid" mode="E,E,E" onchange="setBrandid()"> 
      <option value='-1'>-- ALL -- </option> 
          <layout:options  collection="commodityList" property="ivitemid" labelProperty="ivitemid" /> 
          </layout:select> 
          
          <layout:select key="Commodity Brand Name : "  styleClass="LABEL" property="brandid" mode="E,E,E"> 
      <option value='-1'>-- ALL -- </option> 
          <layout:options  collection="commodityBrandNameList" property="brandid" labelProperty="shortname" /> 
          </layout:select> <script language="javascript"> 
function setBrandid(){ 
var ivitemid=document.getElementById("ivitemid").value; 
var url=" <%=request.getContextPath()%>/AjaxAction?ivitemid="+ivitemid; 
var xmlhttp=getXmlhttp(); 
executeAjax(xmlhttp,"GET",url); } function executeAjax(xmlhttp,method,url){ 
var xmlhttp=xmlhttp; 
xmlhttp.onreadystatechange=function(){ 
if(xmlhttp.readyState==4){ 
if(xmlhttp.status==200){ 
alert(xmlhttp.responseText); 
document.getElementById("brandid").innerHTML = xmlhttp.responseText; //就是这里,不知道这里该传什么,因为联动出这'brandid' 框里值为空。请帮帮忙啊!    



xmlhttp.open(method,url,true); 
xmlhttp.setRequestHeader("If-Modified-Since","0"); 
xmlhttp.send(null); 
} function getXmlhttp(){ 
var xmlhttp; 
if(window.ActiveXObject){ 
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 

else if(window.XMLHttpRequest){ 
xmlhttp=new XMLHttpRequest(); 

return xmlhttp; 

</script>