http://fason.nease.net/samples/bigarea/
请到以上网址进行下载.

解决方案 »

  1.   

    <select onchange="ch(this);">
        <option value="中国">中国</option>
        .....
    </select><script language=javascript>
    function ch(obj)
    {
        if (this.value=='中国') obj.form.sel2.options[0].selected=true;
        .................
    }
    </script>
      

  2.   

    http://community.csdn.net/Expert/topic/3198/3198380.xml?temp=.5498773
      

  3.   

    mjpclab(我是大猫猫啊 http://mjpclab.8u8.com):
    我的意思是怎么把数据库里的值 ,赋给联动下拉框。
      

  4.   

    还是你啊?
    String(objRs("vdata"))是你的value,那么你的s2.value="<%=objRs("vdata")%>"
    也要用这个,不是text了明白不?  [text,value]
      

  5.   

    阿信:
    那个贴子我看过了,不行啊。你的方法是不是:
    在修改页面里添加了test()函数,在body onload事件里调用test()。test()函数中引用的form名称也修改成自己的form名称,别的还有什么需要改的。
    s1.value赋值,赋字符串,赋记录集的域值都试过。不行啊附函数:
    function test()
    {
    with(document.demoform){
    s1.value="网络";
    s1.onchange();
    s2.value="稳定性";
    s2.onchange(); }

    }
      

  6.   

    我赋字符串,只是测试用,真实值是从库里取的。我显示的是VALUE啊
      

  7.   

    显示出来的是text,值是value
    添加时add(key,[[text,value],[text,value]])这样添加
    s1.value=".."这个是你数据库value的值,不是text,如"广东"对应001,001是你的value
      

  8.   

    http://www.changshainvest.gov.cn/myblog/blogview.asp?logID=49&cateID=2
      

  9.   

    你到底想实现什么样的结果..
     fason(Forbes Pu) ( ) 信誉:700 回答的很明白了..他可是这里面的元老级人物..
      

  10.   

    selectIndex = ???or for (var i=0; i<selectname.length; i++)
    {
        if (selectname.options[i].value == ???)
        {
            selectname.selectIndex = i;
            break;
        }
    }
      

  11.   

    <script language="javascript">
    //定义城市数组,可以从数据库动态定义
    city_array = new Array();
    city_array[0] = new Array("1","1","杭州");
    city_array[1] = new Array("3","1","南京");function change(){
    //删除原先城市下拉框的内容
    document.form.city.length = 0;
    //加入新的内容
    document.form.city.options[document.form.city.length]=new Option("所有城市",0);
    pro_value = document.form.pro.options[document.form.pro.selectedIndex].value;
    if (pro_value != "0"){
    for (i = 0;i < city_array.length;i++){
    if (city_array[i][0] == pro_value){
    document.form.city.options[document.form.city.length]=new Option(city_array[i][2],city_array[i][1]);
    }
    }
    }
    }
    </script>
    <form name ="form">
      <select name="pro" onchange="change();">
    <option value="1">所有省份</option>
    <option value="1">浙江</option>
        <option value="2">上海</option>
    <option value="3">江苏</option>
      </select>
      <select name="city">
    <option value="1">所有城市</option>
      </select>
    </form> 分数你自己看着给
      

  12.   

    //处理级联式下拉
     function selectRelationInit(num){
    var i,j,arrTemp=[];
        //保存当前的选择项
    for(i=0;i<num;i++)
          arrTemp[i]=document.all(arrSel[i]).options[document.all(arrSel[i]).selectedIndex].text;
    if(num==arrSel.length){//如果处理到了最后一级则退出
    return;
    }
    with(document.all(arrSel[num]))
        {
        length=0;
    for(i=0;i<arrData.length;i++)
            {
    for(j=0;j<num;j++)
                  if(arrTemp[j]!=arrData[i][j])
                    break;
    if(j!=num)
                  continue;
    if(length==0||options[length-1].text!=arrData[i][num])
                {
      options[length++] = new Option(arrData[i][num],arrDataValue[i][num]);
                }
    }
    onchange=new Function("selectRelationInit("+(num+1)+")");
    selectRelationInit(num+1)
    }
    }
    //执行初始化
    selectRelationInit(0);//初始化
      

  13.   

    我想写一个xml的联动给你,不知你想要不?