Can anyone please help me to understand why I'm not able to append the HTML head to index.htm from an external file(header.htm)?
I'm using the following codes:
Index.htm:
<!DOCTYPE html> <html lang="en"> <head id="head"> <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> </head> <script> //window.location.replace('./Components/header.htm'); $.get("./Components/header.htm", function(data) { //alert(1); $("head").append(data); }); </script> </html>
1.4m articles
1.4m replys
5 comments
56.9k users