如何使用javascript选择所有表 [英] How to select all the tables using javascript

查看:79
本文介绍了如何使用javascript选择所有表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简而言之,我们可以使用选择表格选项来选择所有表格。我如何使用javascript获得

功能。我想选择屏幕上的所有表。

解决方案

你可以选择全部使用'getelementbytagname'获得相同标签的元素



喜欢



document.getElementsByTagName( YourTagname);



ex:table



document.getElementsByTagName(table);

In word,we can select all the tables by using the option 'select tables'. How can i get that
functionality using javascript.Just I want to select all the tables in the screen.

解决方案

you can select all the elements which are having same tag by using 'getelementbytagname'

like

document.getElementsByTagName("YourTagname");

ex:table

document.getElementsByTagName("table");


这篇关于如何使用javascript选择所有表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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