获取相同数量的行 [英] Getting back same number of rows

查看:60
本文介绍了获取相同数量的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在下面有这个代码,允许我将值从绿色水果表移动到随机水果表,反之亦然但问题是我移动所有后从绿色水果表返回到随机水果表的值,所有值都返回为单行,但我希望它返回值,就像它最初一样。是否有任何简单的方法来解决这个问题任何建议将不胜感激?



我尝试过:



这是我的JSFiddle [ ^ ]

I have this code below that allows me to move the value from Green Fruits Table to Random Fruits Table and vice versa but the problem is that after I move all the value from Green Fruits Table back to Random Fruit Table all the value comes back as a single row but I want it to return the value like how it was originally. Is there any simple way to fix this Any suggestion would be greatly appreciated?

What I have tried:

Here is my JSFiddle[^]

推荐答案



最初水果分组如:

Hi,
Initially Fruits grouped like
<tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
</tr>







<pre><tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
</tr>





但添加和删除后所有元素都出现在td





But after add and remove all elements are appear in td

<td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>





所以只有它看起来像是单排。

你需要像这样在4 td in group



so only it appear like in single row.
You need to group in 4 td in tr like this

<tr>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
</tr>





然后只有4乘4



then only it will come 4 by 4


这篇关于获取相同数量的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆