data attr code example
Example 1: get data attribute javascript
//
const el = document.querySelector('#element')
el.dataset.name // 'john'
Example 2: accèder data-id javascript
...
var article = document.getElementById('voitureelectrique');
article.dataset.columns // "3"
article.dataset.indexNumber // "12314"
article.dataset.parent // "voitures"