从没有ID的HTML输入和没有名称的HTML输入中读取数据
我有一个包含多个输入的表的HTML页面。我想从输入中获取数据,但是它们没有ID或名称。
如果分析DOM,我可以看到每个输入都有不同的属性。它有一个属性$ h:2029和一个tkpid:“ 554”。有没有办法阅读这些属性?
输入的代码如下:
如果我检查'tkpid'属性是一种非规范属性:
let input = document.querySelector('input');
input.hasAttribute('tkPid'); \\ Response: false
非常感谢您
I have an html page with a table that contains several inputs.I want to take the data from the inputs, however they do not have id or name.
If I analyze the DOM I can see that each input has different properties. It has a property $H: 2029 and a tkPid:"554". Is there a way to read through these properties?
The code of the input is the following:
If I check 'tkPid' property exists as a non-regular attribute:
let input = document.querySelector('input');
input.hasAttribute('tkPid'); \\ Response: false
Thank you very much
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后,他能够阅读并处理描述的属性如下:
感谢您的兴趣#Lee Taylor
Finally he was able to read and treat the described properties as follows:
Thanks for your interest #Lee Taylor