我假设这是您的整个HTML 页面。
为了让这些脚本运行,您需要将这些 JavaScript 文件与您的网页放在同一个文件夹中,并且实际上要有一个正确的 HTML 页面!
在您的 HTML 页面中,您需要在 head 或 body 中包含对 js1 和 js2 文件的引用,并将您在 HTML 页面本身中编写的脚本包含在 body 中,以便在加载时执行:
<!DOCTYPE html>
<!-- ^ Declaring this DOCTYPE means this is a HTML5 page. -->
<html>
<head>
<!-- This will load your scripts into the document. -->
<script src="js1.js"></script>
<script src="js2.js"></script>
<!--
In a HTML5 page, you don't need to include the
'type="text/javascript"' attribute on script tags.
They're treated as having that by default, unless you say otherwise.
-->
</head>
<body>
<!--
You could also include your scripts here, but I'll
just leave these commented out since they're already included.
<script src="js1.js"></script>
<script src="js2.js"></script>
-->
<script>
js1();
</script>
<!--
You don't need 'language="javascript"' on a script tag.
Use the type attribute, or nothing in a HTML5 page.
-->
</body>
</html>