📜  getattribute javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:18.553000             🧑  作者: Mango

代码示例6

Hi Champ!
// in a console const div1 = document.getElementById('div1'); //=>
Hi Champ!
const exampleAttr= div1.getAttribute('id'); //=> "div1" const align = div1.getAttribute('align') //=> null