This article mainly describes how jquery $ ("#variable") loops around changing the value of variable, and needs a friend to refer to under
Look directly at the example code as follows: for (var p=1 p<=5; p++) { $ ("#properties" +p). Show (); //Below are five IDs properties1, Properties2, Properties3, properties4, properties5 div //We use a statement to let the following five div display successfully. } } <div class= "banner" id= "properties1" > <span> "${property1}" </span> <div id= "property1" class= "Bannerchild" ></div> </div> <div class= "banner" id= "Properties2" > <span> "${property2}" </span> <div id= "Property2" class= "Bannerchild" ></div> </div> <div class= "banner" id= "Properties3" > <span> "${ Property3} "</span> <div id=" Property3 "class=" Bannerchild "></div> </div> <div class= "banner" id= "Properties4" > <span> "${property4}" </span> <div id= Property4 "class=" Bannerchild "></div> </div> <div class=" banner "id=" PROPERTIES5 "> <Span> "${property5}" </span> <div id= "property5" class= "Bannerchild" ></div> </ div>