开发者

How to get a Javascript Chained Menu Output Values of Selected Drop Downs after Submitting Form?

开发者_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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜