开发者_JS百科I am using this script Dynamic Drive Chained Menu and what I am trying to do is when someone clicks the "go" button the values of the selections made display in a text box with a message that says something like "You have selected:"
I've changed the main part, from the alert
is up to you :)
function goListGroup(){
var options = [];
for (i=0;i<arguments.length; i++){
if (arguments[i].selectedIndex!=-1){
options.push(arguments[i].options[arguments[i].selectedIndex].value);
}
}
alert(options);
}
Don't forget to set the value
attribute on the option
element!
精彩评论