JavaScript Intro For Trysky.OMC

JS Tutorial For TrySky IT Center (Operation and Maintenance Center)

Written by Zhang Zhihong in 2021

GO NOW

01 Introduction

HTML是一种标记语言,用来结构化我们的网页内容并赋予内容含义,例如定义段落、标题和数据表,或在页面中嵌入图片和视频。

CSS 是一种样式规则语言,可将样式应用于 HTML 内容, 例如设置背景颜色和字体,在多个列中布局内容。

JavaScript 是一种脚本语言,可以用来创建动态更新的内容,控制多媒体,制作图像动画,还有很多。(好吧,虽然它不是万能的,但可以通过简短的代码来实现神奇的功能。)

there are three ways to use the javascript:

  1. 在网页中使用 标签之间。
    脚本可被放置在 HTML 页面的和 部分中。

    02 First JS program

    Here will show that how js work in html ,as you can seem, usually you need a “document” to start you code, you can think of it as an object.(It’s easy to understand if you learn an object-oriented programming language like Java.)
    If you’re so confused, use it as a tool that you can use to run JavaScript statements.

    //1.0
    
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Documenttitle>
        <script>
            document.write("now,I want to write a js program for my html");
            document.write("

    now,I want to write a js program for my html in h1

    "
    );
    script> head> <body> <h1>now,I write a normal h1 in htmlh1> body> html>

    In the code above, “document.write” was used to write sentences into web page, it is not different from which write in html. But it depend on JavaScript.

    So, now you have learn how to use JS in first way: “1.在网页中使用

你可能感兴趣的:(TrySky,html,javascript,js,html5)