skip to Main Content

How to insert HTML using querySelector & modules?

My website uses this in the frame.html head so it appears globally: <!--START: infopages--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('#15').load("../assets/15.html"); $('#16').load("../assets/16.html"); $('#17').load("../assets/17.html"); $('#18').load("../assets/18.html"); $('#19').load("../assets/19.html"); $('#20').load("../assets/20.html"); }); </script> <!--END: infopages--> Other individual pages/places will have a reference like this (different pages make…

VIEW QUESTION

Javascript – document.querySelector is returning null for a very simple beginner problem. I have no idea why

html is basically boiler plate <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <script src="script.js"></script> </head> <body> <input id="text-input" required placeholder="Please input a value" /> <button id="check-btn"></button> <div id="result"></div> </body> </html> js const textInput…

VIEW QUESTION
Back To Top
Search