0

I have a shared external HTML file, inside that html file : a full html source code has written inside a <code> tag. Please help me to read that html source code inside the <code></code> tag and display it in another html file which i need to save in my system locally.

there will be changes in html source code inside the <code> tag, so without referring there i need to load the html source code in my page load, automatically.

how can i make it possible

Jasi
  • 1
  • 1
  • Welcome to Stack Overflow! Visit the [help], take the [tour] to see what and [ask]. Please first ***>>>[Search for related topics on SO](https://www.google.com/search?q=javascript+get+content+tag+other+site+site%3Astackoverflow.com)<<<*** and if you get stuck, post a [mcve] of your attempt, noting input and expected output using the [`[<>]`](https://meta.stackoverflow.com/questions/358992/ive-been-told-to-create-a-runnable-example-with-stack-snippets-how-do-i-do) snippet editor. – mplungjan Apr 21 '21 at 11:45
  • Hi! If you're looking to retrieve some data (i.e. the text, not the rendered HTML) on the page load, the `window.onload` function ([documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event)) might be what you're looking for. If you instead want to render the other page, maybe an iframe could be a solution ([documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)). I'm not too sure what exactly you want to achieve. Consider providing a minimal example with some code to illustrate your problem :) – fravolt Apr 21 '21 at 11:48

0 Answers0