Form Control JavaScript DHTML




function check(){
    coffee=document.forms[0].coffee
    answer=document.forms[0].answer
    txt=""
    for (i=0;i        if (coffee[i].checked){
            txt=txt + coffee[i].value + " "
        }
    }
    answer.value="You ordered a coffee with " + txt
}




    How would you like your coffee?


    With cream

    With sugar