Dynamically identify/locate HTML tables within a page?
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)

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

Give them a specific ID and target this id using Javascript acting on the DOM.
发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。