zoukankan      html  css  js  c++  java
  • 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写出来的文字");

  • 相关阅读:
    html表格,table标签
    2-3VRP的基本配置
    6 sys模块
    3 datetime模块
    2 time模块
    1 模块和包的介绍
    12 函数进阶---生成器
    13 函数进阶---迭代器
    10 函数进阶---闭包
    11 函数进阶---装饰器
  • 原文地址:https://www.cnblogs.com/lichunyan58/p/9097440.html
Copyright © 2011-2022 走看看