在另页面怎么取得原来页面中select列表中所有的值呀
在1.jsp页面我有一个select的列表框
里面有很多值,提交的时候我用脚本让里面的值都为selected
那么我在另外的地方怎么取得这些值呀

解决方案 »

  1.   

    request("selectName")[0]
    request("selectName")[1]
    request("selectName")[2]
    request("selectName")[3]
      

  2.   

    不太明白!
    我的select的name属性为right
    我用js把
    for(i=0;i<right.options.length;i++){
    right.options[i].selected = true;
    }
    然后提交到一个action
    在里面用
    String[] roles = (String[])request.getParameterValues("right");
    但是取出来为null呀
    是不是甚么地方出问题了
    在线请教
      

  3.   

    A:
    String roles = (String)request.getParameterValue("right");
    打印roles看看B:<select size="10" multiple>
    <option>1</option>
    <option>1</option>
    <option>1</option>
    <option>1</option>
    <option>1</option>
    <option>1</option>
    <option>1</option>
    </select>