question 1: when initializing the page, you need to determine whether the value of the arr2 array is the same as that of the arr array, and if so, add the corresponding background color
arr2: [
{key:"",text:""},
{key:"",text:""},
{key:"",text:""},
{key:"",text:""},
]
Picture
question 2: when you click a value in the list (such as social insurance and house fund), add the corresponding background color, and click again to delete the background color
the link to the question is here
https://jsfiddle.net/xiyanzi/.