C
C
Cherreshnyaa2022-02-09 13:52:14
JavaScript
Cherreshnyaa, 2022-02-09 13:52:14

Can't see main.js, what should I do?

For some reason, chrome stopped finding main.js. Tried clearing the cache, didn't help. What to do?

<!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">
    <title>Document</title>
</head>
<body>
    <script src='/main.js'></script>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
MrColdCoffee, 2022-02-09
@MrColdCoffee

the structure of folders and files would...
most likely the path specified is incorrect
Try the options:

<script src='../main.js'></script>
или
<script src='main.js'></script>

K
Karasyonok =), 2022-02-09
@KarasTipoNoNet

You can write code in a tag<script></script>

I
IlonMusk, 2022-02-09
@IlonMusk

put a period before the slash ./main.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question