• 吴裕雄--天生自然 JAVASCRIPT开发学习:输出


    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>菜鸟教程(runoob.com)</title>
    </head>
    <body>
        
    <h1>我的第一个页面</h1>
    <p>我的第一个段落。</p>
    <script>
    window.alert(5 + 6);
    </script>
        
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
        
    <h1>我的第一个 Web 页面</h1>
    <p id="demo">我的第一个段落。</p>
    <script>
    document.getElementById("demo").innerHTML="段落已修改。";
    </script>
        
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
        
    <h1>我的第一个 Web 页面</h1>
    <p>我的第一个段落。</p>
    <script>
    document.write(Date());
    </script>
        
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
        
    <h1>我的第一个 Web 页面</h1>
    <p>我的第一个段落。</p>
    <button onclick="myFunction()">点我</button>
    <script>
    function myFunction() 
    {
        document.write(Date());
    }
    </script>
        
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head> 
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title> 
    </head>
    <body>
        
    <h1>我的第一个 Web 页面</h1>
    <p>
    浏览器中(Chrome, IE, Firefox) 使用 F12 来启用调试模式, 在调试窗口中点击 "Console" 菜单。
    </p>
    <script>
    a = 5;
    b = 6;
    c = a + b;
    console.log(c);
    </script>
        
    </body>
    </html>

  • 相关阅读:
    Emulator PANIC: Could not open: AVD2.3.1
    VC++ 6.0 快捷键
    eclipse 中文版 变成 英文版 方法
    SharedPreferences 用法
    subString
    Android键盘属性
    【Android异常】The specified child already has a parent. You must call removeView() on the child's parent first.
    ListView的ScrollListener
    Android 自定义格式的对话框
    Android ListView 设置
  • 原文地址:https://www.cnblogs.com/tszr/p/10941865.html
Copyright © 2020-2023  润新知