简体   繁体   English

使用jquery或javascript仅在iframe中显示表格,还隐藏某些列?

[英]Using jquery or javascript to show table only in iframe but also hide certain columns?

I have placed an iframe into a div, i know it is possible for me to display ONLY the table of data i require and hide the rest of the page, but i need to remove columns from the table as well is this possible with jquery? 我已经将iframe放置到div中,我知道可以只显示所需的数据表并隐藏页面的其余部分,但是我还需要从表中删除列,是否可以用jquery进行? the data is held in doms??? 数据保存在doms中??? so was hoping there is a small possibility. 所以希望有一个小的可能性。

Thanks for your comments and help. 感谢您的评论和帮助。

As far as i understand, you want to remove specific table columns right? 据我了解,您想删除特定的表格列吗?

$('table tr').each(
    function(tr_idx,el){
        $(el).children('td').each(
            function(td_idx,el2){
                //i'm removing first columns..
                if(td_idx == 0){
                    el2.remove();
                }
        });//inner each
});//outer each

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM