Using the dataset property
The new dataset property allows access (for both reading and writing) to all data attributes data-* on any element.
<p>Countries:</p>
<ul>
<li id="C1" onclick="showDetails(this)" data-id="US" data-dial-code="1&q...