zoukankan      html  css  js  c++  java
  • 9.27js拓展、bootstrap菜鸟教程

    js(点击挂上 与 点击移除)

    <div id="dd" style="200px; height:200px; background-color:#669">
    这是一个层
    </div>

    <span onclick="a()">点击挂上事件</span>
    <span onclick="b()">点击移除事件</span>

    <script type="text/javascript">
    function showdd()            这里的showdd自定义
    {
      alert("被点中了");
    }


    function a()
    {
      var d = document.getElementById("dd");
      d.onclick = function (){showdd()};       这里的 function (){showdd()} 为匿名函数,大括号里填写要执行的代码
    }


    function b()
    {
      var d = document.getElementById("dd");
      d.onclick = function (){};         匿名函数为空
    }

    </script>

    bootstrap:(响应式设计:Bootstrap 的响应式 CSS 能够自适应于台式机、平板电脑和手机)

    http://www.runoob.com/bootstrap/bootstrap-navbar.html  关联网页

    在head里面添加:

    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">  通常写title上面

    <link href="../bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />     核心css文件

    <script src="../bootstrap/dist/js/jquery-1.11.2.min.js"></script>          核心jquery文件

    <script src="../bootstrap/dist/js/bootstrap.min.js"></script>              核心js文件

     这里的link href 与 script src 是样式插入地址

  • 相关阅读:
    默认约束(十六)
    唯一约束(十五)
    主键约束(十四)
    自动编号(十三)
    空值(NULL)和非空(NOT NULL)(十二)
    Codeforces Round #249 (Div. 2) A B
    MySQL 採用Xtrabackup对数据库进行全库备份
    强算KMeans聚类算法演示器
    提高短信营销效果的四大技巧分析
    14年7月总结
  • 原文地址:https://www.cnblogs.com/u1020641/p/5912244.html
Copyright © 2011-2022 走看看