To obtain the attribute name based on attr (attribute), you must know the class name or id name of the upper-level div,
or you know the class or id of the div to obtain other attributes. This is all done. $("#d1").attr("xxx");xxx is the value of an attribute you want to get.
The complete list is as follows:
$("#div1").find("div").attr("id")
$("#div1").find("div").attr("class ")