How to get the id of the selected table rows?

I am having a table with more than 100 columns, i have to select one or more rows by using shift keys and control keys, and then i have to get those selected ids to display in alert box.

Here I am attaching my sample code.
HTML Table:

ID Name Class
1 John 4th
2 Jack 5th
3 Michel 6th
4 Mike 7th
5 Yke 8th
6 4ke 9th
7 7ke 10th

You can start by finding the keycode of those keys
For the alert box you can use an alert box this is to do with HTML/CSS