• html 基础操作 css js


    运行: Control + R
    保存: Control + S
    注释:Control + /

    表格标签
    table:定义表格
    tr:定义行
    td:定义列

    div:块标签

    引入css文件      href
    <link rel="stylesheet" href="css/style.css" type="text/css"/>

    <link rel="stylesheet" type="text/css" href="css/style.css"/>

    <!--form表单里面一般放置input标签-->
    <!--普通的输入框-->
    <!--placeholder提示语 value默认值-->

    <!--method:表单提交方式-->
    <!--action:表单信息提交地址-->
    eg:<form method="post" action="http://127.0.0.1:8001/post.php">

    <style type="text/css">
    /*css语言*/
    </style>

    <link rel="stylesheet" type="text/css" href="css/style.css"/>

    js 格式:

    <script type="text/javascript">

    </script>

    <script type="text/javascript">
    console.log("我是head中的输出");
    </script>

    <!--src属性为引入js文件的路径-->
    <script type="text/javascript" src="js/firstJS.js">

    <!--style可以放在文件的任意位置,但是建议放在head标签里面-->
    <style type="text/css">
    p{
    color: red;
    }
    </style>

    <!--一般情况下,script不写在head标签中,因为写在head中的script
    会在body加载之前就执行,导致一些写在script中的效果出不来-->
    <!--一般写在head中的scrpit标签,都是引入外部的js文件-->
    <!--src属性为引入js文件的路径-->
    <script type="text/javascript" src="js/firstJS.js">
    //当script标签有src属性时,其开始标签与闭合标签中的js语句不再执行
    console.log("我就是不能输出");
    </script>

    控制台输出语句

    console.log("hello world");

    浏览器提示框
    alert("这是我自己创建的提示框");

    //页面输出
    document.write("我是通过write写出来的文字");

  • 相关阅读:
    2018-2019-1 20165313 20165212 20165222 实验二 固件程序设计
    2018-2019-1 20165313 20165212 2016522 实验一 开发环境的熟悉
    课程总结
    2017-2018-2 20165222 实验五《网络编程与安全》实验报告
    2017-2018-2 20165222实验四《Android程序设计》实验报告
    20165222 第十周课下补做
    20165222 实验三 敏捷开发与XP实践
    各种树
    【面试】MySQL
    Redis
  • 原文地址:https://www.cnblogs.com/lichunyan58/p/9097440.html
Copyright © 2020-2023  润新知