java.lang.String[] getParameterValues(java.lang.String name) Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
读取option的value for (i=0;i<=aselect.options.length!=0;i++){ v = aselect.options[i].value; } 删除select中的option for (i=0;i<=aselect.options.length!=0;i++){ aselect.options[i]=null; aselect.options.remove(i); } 添加option aselect.add(document.createElement("OPTION")); aselect.options[j].text=labels; aselect.options[j].value=values;
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
v = aselect.options[i].value;
}
删除select中的option
for (i=0;i<=aselect.options.length!=0;i++){
aselect.options[i]=null;
aselect.options.remove(i);
} 添加option
aselect.add(document.createElement("OPTION"));
aselect.options[j].text=labels;
aselect.options[j].value=values;
比如select的name是btsel,表单里面设一个变量,比如tempsel.
var url = "xxx.screen?";
if(typeof(btsel)!="undefined")
{
for (i=0;i<btsel.options.length;i++)
{
if(i=btsel.options.length-1)
url += "tempsel="+btsel.options[i].value;
else
url += "tempsel="+btsel.options[i].value+"&";
}
}
document.yourform.action = url;
document.yourform.submit();
然后你再用getParameterValues(tempsel),就OK了。