Skip to content
Advertisement

How to use Fetch API and append correctly

This is my html

JavaScript

This is example html i want to fetch

JavaScript

This is code i know how to fetch and append whole html to my id=’data’

JavaScript

but i don’t want to append whole html but i only want to get class=”m-card single-page” of example.com and append to my id=’data’. I don’t know how to, please advice me, thanks you

Advertisement

Answer

As an approach several things could be used here:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement