通过jquery添加动态列 [英] Adding dynamic column by jquery

查看:87
本文介绍了通过jquery添加动态列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友如何使用jquery动态追加列。

解决方案

嗨朋友,



这是我所理解的问题的快速解决方案。您可能需要对此方法进行大量改造。但它很简单



 


document )。ready( function (){
// 假设您有一个动态生成的数组,它将包含每行中单个列的所有数据。
/ / 或包含每行内部数组中每列的数据的二维数组(您可能了解我)
var col_array = new 数组 Hello World !!!);

// 现在,您必须为要执行操作的表提供ID。放开说#mytable。所以,


#mytable tr).each(函数(指数){

Hi friend how to append the column dynamically by using jquery.

解决方案

Hi Friend,

Here's a quick solution to what I have understood is your problem. You may need to do a lot of makeover of this method. But it's simple


(document).ready(function(){ // Assuming you have an array that you have generated somehow dynamically which will contain all the data of a single column in each row. // or a 2D array with data for each column in internal array in each row (You may have understood me) var col_array = new Array("Hello","World","!!!"); // Now you must have given an ID to the table on which you want to perform the operation. Let up say #mytable. So,


("#mytable tr).each(function(index){


这篇关于通过jquery添加动态列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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