I am working on an html document folder (a form), and linked it to the js document folder. But all the changes made to the html from the js document folder are not posted on the console. I click inspect, console, and the are not linked. Can someone help? Thanks
this is the code on Visual studio:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="#">
<title>Form</title>
</head>
<body>
<div container="container">
<h1>Form</h1>
<h2>Hello</h2>
<div class="mb-3">
<label for="exampleFormControlInput1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com">
</div>
<div class="mb-3">
<label for="exampleFormControlTextarea1" class="form-label">Example textarea</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
</div>
</div>
<script src="script.js"></script>
</script>
</body>
</html>
in the js folder, this command does not show anything on the console.
console.dir(document);
How are you running/accessing this file?
Also I think there's an extra closing script tag, that could be causing the error as well
You could try installing a vs code extension "Live Server" that'll spin up a local server out-of-the-box with zero configuration.
https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer