js 基础语法 书写方式

复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JS 引入方式</title>

    <!-- 内部脚本 -->
<!--     <script>
        alert('hello JS');
    </script> -->


    <!-- 外部脚本 -->
    <script src="js/demon.js"></script>
</head>
<body>
    <script>
    
    // <!-- 弹出警告框 -->
            window.alert("hell js");

    // <!-- 写入html页面中 -->
    document.write("hello js");
    
    // <!-- 输出到控制台 -->
    console.log("hello js");
    
    </script>
    

    
</body>
</html>
相关推荐
小小测试开发5 小时前
安装 Python 3.10+
开发语言·人工智能·python
KaMeidebaby5 小时前
卡梅德生物技术快报|PD1 单克隆抗体定制配套 N 糖全谱质控开发
前端·人工智能·算法·数据挖掘·数据分析
nuIl6 小时前
实现一个 Coding Agent(3):工具调用
前端·agent·cursor
nuIl6 小时前
实现一个 Coding Agent(4):ReAct 循环
前端·agent·cursor
AAA大运重卡何师傅(专跑国道)6 小时前
【无标题】
开发语言·c#
nuIl6 小时前
实现一个 Coding Agent(1):一次 LLM 调用
前端·agent·cursor
nuIl6 小时前
实现一个 Coding Agent(2):让 LLM 流式响应
前端·agent·cursor
copyer_xyf6 小时前
Python 异常处理
前端·后端·python
sugar__salt6 小时前
从栈队列数据结构到JS原型面向对象全解
前端·javascript·数据结构
XBodhi.7 小时前
Visual Studio C++ 语法错误: 缺少“;”(在“return”的前面)
开发语言·c++·visual studio