<script language="JavaScript">
window.onload=function(){
document.all.CUSTOMER.value="2";
document.all.CUSTOMER.onchange();
}
</script>
我这样写,可是没效果。

解决方案 »

  1.   

    <option value=<%=strCustomer%> ><%=rsCustomer.getString("CUSTOMER_NAME")%></option>
    -->更正一下
    <option value=<%=strCustomer%> <%=strSelected%>><%=rsCustomer.getString("CUSTOMER_NAME")%></option>这样第一个select框倒是可以选到,可是第二个动态的多选列表框没有任何效果产生。。怎么没有人帮忙啊···
      

  2.   

    在本页的</body>前加上
    <script language="JavaScript">
    if(document.all)
    {
      document.all.CUSTOMER.value="2";
      ChangeContact("2");
    }
    </script>
      

  3.   

    to:cnfalcon(中国猎鹰)
    谢谢你但是好像没用
      

  4.   

    onload的时候不能自动触发"CUSTOMER"的onChange事件,那你就手工执行一下:
    <BODY onLoad="ChangeContact(document.indexform.CUSTOMER.options[document.indexform.CUSTOMER.selectedIndex].value)">
    看看这样行不行?
      

  5.   

    或者在</BODY>前调用你的ChangeContact函数,如:
    ........
    <script language="javascript">
       ChangeContact(document.indexform.CUSTOMER.options[document.indexform.CUSTOMER.selectedIndex].value)">
    </script>
    </BODY>
      

  6.   

    谢谢yrsheng(以德服人) ,问题已经解决。
    也谢谢楼上回答的朋友