Skip to content

Commit 842feb1

Browse files
author
Hadley
authored
Moved <script> into <body>, removed .focus()
Moved <script> element into <body> element following W3C recommendations; removed inputForm.focus(), which caused the page at https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Math to jump past the first few paragraphs of content to the console whenever newly accessed.
1 parent ba71a22 commit 842feb1

File tree

1 file changed

+3
-6
lines changed
  • javascript/introduction-to-js-1/variables

1 file changed

+3
-6
lines changed

javascript/introduction-to-js-1/variables/index.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@
5555
</head>
5656
<body>
5757

58-
59-
</body>
60-
6158
<script>
6259
var geval = eval;
6360
function createInput() {
@@ -70,7 +67,6 @@
7067
inputDiv.appendChild(inputPara);
7168
inputDiv.appendChild(inputForm);
7269
document.body.appendChild(inputDiv);
73-
inputForm.focus();
7470

7571
inputForm.addEventListener('change', executeCode);
7672
}
@@ -98,6 +94,7 @@
9894

9995
createInput();
10096

101-
10297
</script>
103-
</html>
98+
99+
</body>
100+
</html>

0 commit comments

Comments
 (0)