Dynamically identify/locate HTML tables within a page?

Dynamically identify/locate HTML tables within a page?

感情旳空白 发布于 2021-11-29 字数 455 浏览 862 回复 2 原文

Admin users can add HTML content to a website via a CMS textbox control.

When this content is displayed to a website visitor, I'd like to identify the presence of a HTML table (added by a Admin user using the CMS) and display an option for visitors to export that table.

I can handle the exporting, but identifying the HTML tables has me stumped.
Can anyone provide me with some direction? This website is using ASP.NET 2.0/VB.NET.

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

扫码加入群聊

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如果没结果 2022-06-07 2 楼

If you want to do this work client side you can do so with JavaScript using getElementsByTagName('table').

http://www.w3schools.com/HTMLDOM/met_doc_getelementsbytagname.asp

近箐 2022-06-07 1 楼

Give them a specific ID and target this id using Javascript acting on the DOM.

http://www.w3schools.com/htmldom/dom_obj_table.asp