Js obtains the background field and changes the selected status code of the checkbox. For more information, see.
The Code is as follows:
Is it a package person?
Is it the total contractor?
Zbr = ("Y". equals (String. valueOf (map. get ("ylzd11 "))))? "1": "0"; // whether it is the total contractor
Fbr = ("Y". equals (String. valueOf (map. get ("ylzd12 "))))? "1": "0"; // whether it is a package
Return "jzysuccess ";
Function init (){
// Common invoice payer type code 1 stands for the unit 0 stands for the individual
If ($ ("# fkfLxDm"). val () = '1 '){
$ ('Input [type = radio] [value = 1] ') [0]. checked = true;
} Else if ($ ("# fkfLxDm"). val () = '0 '){
$ ('Input [type = radio] [value = 0] ') [0]. checked = true;
}
// Whether the unified invoice for the construction industry is the total contractor
If ($ ("# zbr"). val () = '1 '){
//The id of the zbr package owner must be accurate and unique.
$ ("# Zbr1") [0]. value = true;
Alert ($ ("# zbr"). val ());
$ ('Input [type = checkbox] [value = true] ') [0]. checked = true;
Alert ($ ("# fbr"). val ());
} Else {
$ ("# Zbr") [0]. value = false;
$ ('Input [type = checkbox] [value = false] ') [0]. checked = false;
}
// Whether the unified invoice for the construction industry is the package owner
Alert ($ ("# fbr"). val ());
If ($ ("# fbr"). val () = '1 '){
//The fbr package id must be accurate and unique.
$ ("# Fbr1") [0]. value = true;
$ ('Input [type = checkbox] [value = true] ') [1]. checked = true;
} Else {
$ ("# Fbr") [0]. value = false;
$ ('Input [type = checkbox] [value = false] ') [1]. checked = false;
}
}