How to get the id of an input field

How to get the id of an input field

How to return the id part of an input field

This is very simple to return it is simply this.id

we have an input field below whose id is test. If you click it it will show an alert message with the id test.

the javascript used is onclick="alert(this.id)"

Hope this helps

 


SELL SELL SELL