Frog frog asking: solving the problem of dynamic splicing table

xiaoxiao2021-03-05  24

Frog frog Ask: The problem of dynamic splicing table issues is like this, I want to take out the form of the form after logging out of the database, that is, every 4 record sets into one table, two rows of two lines in each table, each Table Recordset, how to generate? Note that the property has an id in the form to start increment

RS (0) RS (0) RS (0)
rs (0) rs (0)

rs (0) rs (0)
rs (0) RS (0)

Our usual output record set is a record, occasionally there are columns displayed, and one line shows N records, and then you have to have a form on this basis, you have to ensure that the generated form cannot be Only the label does not turn the label.

Convert the problem to generate a table with a number between 1 to a number, using JS's document.write method, it is actually white, this is an algorithm problem

1 2 3 4

5 6 7 8

...... I 省 省 省,, I want to see the law, I have to consider that if the number of termination cannot be fixed by 4, it has to guarantee the correctness of the generated HTML tag, and cannot be lacking. The display is not good. If necessary, you have to consider the number of two lines in a table to display 2 numbers, and the following line shows 1 number, so the cell must be cross two cells, such as 7

The problem is solved, and the following algorithm has been written in the morning