企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
# getAttribute 获取元素属性 ~~~ <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>DOM-obj</title> </head> <body> <a href="http://blogcurder.sinaapp.com" id="aid" title="a标签的title属性值"></a> <script> aNode = document.getElementById('aid'); console.log(aNode.getAttribute('title')); // a标签的title属性值 </script> </body> </html> ~~~