Jumping over </body>

Thus is my code:

<!--The better your JS is, the better your HTML will look like-->
<!--JS is supreme. I luuuuuv JS. And I'd love to watch Bourne Supremacy-->
<!--I luv JS-->
<html lang="sv-en">
<head>
    <meta charset=UTF-8"> <!--mb4-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>alascae.com</title>
    <style>
     .bold {
      font-weight: bold;
     }
    </style>
    <link rel="stylesheet" href='css/_sheldon/_supper.css'>
</head>
<body>
    <button></button>
</body>
<script src="js/_inflammable.js"></script>
</html>

I want the _inflammable.js to “JUMP OVER” </body> tag

What do you mean when you say “jump over”?

I mean that, if the script would’ve been exactly after button, I’d just need to write the escape sequence in the inflammable file. But now I have </body> BEFORE the button

If the code is gonna follow the escape sequence, then </body> MUST BE INCLUDED IN THE INFLAMMABLE FILE

Not really, this is just a a path to the file.

For example, I can’t just write document.getElementsByTagName('button').innerHTML = "My first JS!";
I need something BEFORE document that explains "Hey, there is a </body> tag here.

I am not sure I understand what you are asking for
the usual place for the <script> tag is right before </body>

1 Like

Yea, but I want all of my JS-scripts to be between </body> and </html>

all your JavaScript will go in the js/_inflammable.js file, or not?

anyway, putting the script right above </body> is the usual way. Do as you want…

still </body> is html, it can’t go in a *.js file

As you can see, this doesn’t do anything because the </body> tag is not included.

document.getElementsByTagName('button').innerHTML = "My first Js!";

HTM-file:

<!--The better your JS is, the better your HTML will look like-->
<!--JS is supreme. I luuuuuv JS. And I'd love to watch Bourne Supremacy-->
<!--I luv JS-->
<html lang="sv-en">
<head>
    <meta charset=UTF-8"> <!--mb4-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>alascae.com</title>
    <style>
     .bold {
      font-weight: bold;
     }
    </style>
    <link rel="stylesheet" href='css/_sheldon/_supper.css'>
</head>
<body>
    <button></button>
</body>
<script src="js/._inflammable.js"></script>
</html>

wrong

getElementsbyTagName returns an array-like data structure, you need to select an element from that with bracket notation

this giving for good that your file structure is correct

doing that change, it works
(I used it in the browser console)