+ 2

what does class do here?

<input type="submit" value="SEND" class="submit" />

22nd Feb 2018, 2:32 AM
RH Tasin
RH Tasin - avatar
2 Antworten
+ 2
The class is like a tag or name, you can find this node with the class, for example in JS: var x = document.getElementsByClassName("submit");
22nd Feb 2018, 2:38 AM
Emmanuel David Angarita Quintanilla
Emmanuel David Angarita Quintanilla - avatar
+ 1
It allows you to grab elements by group name (i.e class name). Like 'id' attribute which allows you to grab individual element. Hope it helps :)
22nd Feb 2018, 2:43 AM
Sylar