<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <!-- <script src="first.js"></script>外部样式--> <script> alert("hello,welcomeJavaScript") </script> <!-- 内部样式--> </head> <body> </body> </html>
first.js文件:
alert("hello,welcomeJavaScript")