[b]"How can I capture the HTML from a link in JavaScript?"[/b] Alternatively, for a more conversational tone: [b]"W

20 Replies, 1211 Views

"What's the best way to capture the html from a link in javascript?"

Hey folks!

Trying to figure out how to capture the html from a link in javascript. Like, I wanna grab the entire HTML content of a page when someone clicks a link.

Tried `fetch()` and `innerHTML` stuff, but it’s not working as expected. Am I missing something?

Any quick tips or examples would be awesome!

Thanks in advance Smile

---

*or the troubleshooting version:*

"Why isn't my code able to capture the html from a link in javascript?"

Ugh, so frustrating!

I’m trying to capture the html from a link in javascript, but my code just... doesn’t. Using `fetch()` and then logging the response, but it’s empty or errors out.

Is it a CORS thing? Or am I just dumb? Lol.

Help a dev out!

Messages In This Thread
[b]"How can I capture the HTML from a link in JavaScript?"[/b] Alternatively, for a more conversational tone: [b]"W - by - 04-09-2024, 03:34 AM



Users browsing this thread: 1 Guest(s)