Home > front end >  Kneel to beg
Kneel to beg

Time:10-06

Use javascript
Determine whether the user has chosen A or B;
If there is A user selects A cannot choose B

CodePudding user response:

The simplest radio buttons

CodePudding user response:

CodePudding user response:

Giving A, B two radio set change event, the change event is used to determine the
Define a, b two global variables, initialize the assignment is to false
Achange () {
if(! B) {
Enclosing a=true
} else {
Alert (' you've chosen B)
}
}

Bchange () {
if(! A) {
This. B=true
} else {
Alert (' you've chosen A ')
}
}


CodePudding user response:

With radio buttons directly

CodePudding user response:

Examples of radio buttons, upstairs

CodePudding user response:

Use the radio button is ok, isn't it
  • Related