JS obtient le premier élément par classe
var elements = document.getElementsByClassName('className');
var requiredElement = elements[0];
Captain Obvious
var elements = document.getElementsByClassName('className');
var requiredElement = elements[0];