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 是样式插入地址

  • 相关阅读:
    洛谷P1330 封锁阳光大学
    洛谷P1341 无序字母对
    Bzoj1059 [ZJOI2007]矩阵游戏
    POJ2337 Catenyms
    Bzoj2342 [Shoi2011]双倍回文
    Bzoj1009 [HNOI2008]GT考试
    Bzoj3670 [Noi2014]动物园
    POJ2406 Power Strings
    POJ 2752 Seek the Name, Seek the Fame
    POJ3522 Slim Span
  • 原文地址:https://www.cnblogs.com/u1020641/p/5912244.html
Copyright © 2011-2022 走看看