This article mainly introduces the sample code of jquery's unselect select drop-down box. If you need it, you can refer to it. I hope it will help you with three select drop-down boxes.
Two classes are hidden in one category. When selecting a category, the category is displayed and the items selected by other classes are cleared.
This requirement is a bit ..........
The following are three select statements:
The Code is as follows:
All Aa Bb
All A A A A A
All B
Jquery extension. When calling, use $ ("select"). removeSelected ();
The Code is as follows:
JQuery. fn. removeSelected = function (){
This. val ("");
};
To select a Category Selection box, call the selectFunction () method:
The Code is as follows:
Function selectFunction (){
If ($ ("# sel_type"). val () = "7 "){
$ ("# Sel_children0"). show ();
$ ("# Sel_children1"). hide ();
$ ("# Sel_children1"). removeSelected ();
} Else if ($ ("# sel_type"). val () = "8 "){
$ ("# Sel_children1"). show ();
$ ("# Sel_children0"). hide ();
$ ("# Sel_children0"). removeSelected ();
} Else {
$ ("# Sel_children0"). hide (). removeSelected ();
$ ("# Sel_children1"). hide (). removeSelected ();
}
}
The premise is to first introduce the jquery. js File