If the p in the picture is of different types, I now want to put the different types of p into the object (the object consists of the top, left and id of p) to form an array. How can I distinguish different types of p in the upload background? Woolen cloth? Add different classes to p and judge? Thanks!
Since it is a type, you can generally add a class without style. You can also use data-type="a" like this.
I guess the questioner wants to make a drag-and-drop layout?
Generally use the form of "data-xx" to distinguish and bind. The frontend can use js to do ajax to tell the backend which type of elements need to be processed.