问题
I need to get value of data-headline from this html through Java. Tried "getElementsByTag" and "getElementsByClass" but no luck.
<div class="component template hidden"
data-id="8943"
data-page=""
data-reviews-sort="rating"
data-reviews-count="0"
data-ratings-average="0"
data-rating-counts="[]"
data-ratings-count="0"
data-headline="Java Code">
Any quick help is really appreciated.
来源:https://stackoverflow.com/questions/64223069/how-to-get-values-from-div-data-attribute