📜  使用 Angular 获取所有 html 元素数据 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:22.785000             🧑  作者: Mango

代码示例1
File your-component-name.component.html




file your-component-name.component.ts
In the class make function named as 

getelementData(nameinput){
 console.log(nameinput);  // output will be the whole button element with their attributes
 // if you want to show specific attribute data then 
 console.log(nameinput.value);  // it will reflects the value of textbox which has been entered
}