get all html element data using angular
File your-component-name.component.html
<input type="text" #inputbox>
<button type="submit" (click)="getelementData()">Show element data</button>
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
}
Also in HTML:
- how to change tab icon in html
- how to add icon in html
- excel number format hide values cheat sheet
- html checkboxfor is not visible
- how to set a fav icon
- how to make a html captcha
- html select placeholder
- youtube video image
- html-webpack-plugin npm
- embed github html
- how to make html open link in new tab
- js html elements dom cheet sheet
- excel number format hide values cheatsheet
- center text in a html file
- vue class binding
- name a input submit html
- what does html stand for
- random number text in html
- html layout
- html external javascript
- javascript create node from innerhtml
- v-model in html
- HTML Character Entities
- hide image on click