zoukankan      html  css  js  c++  java
  • javascript和jquery比较

    <h1>我的第一段 JavaScript</h1>
    <p>请输入数字。如果输入值不是数字,浏览器会弹出提示框。</p>
    <input id="demo" type="text">
    <script>
    function myFunction()
    {
    var x=document.getElementById("demo").value;
    if(x==""||isNaN(x))
    {
    alert("Not Numeric");
    }
    }
    </script>
    <button type="button" onclick="myFunction()">点击这里</button>
    </body>
    </html>

    <html>
    <head>
    <script type="text/javascript" src="/jquery/jquery.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
      $(".btn1").click(function(){
      $("p").slideToggle();
      });
    });
    </script>
    </head>
    <body>
    <p>This is a paragraph.</p>
    <button class="btn1">Toggle</button>
    </body>
    </html>
  • 相关阅读:
    Docker入门
    服务配置中心
    zuul网关
    git2
    git1
    git
    shiro授权、注解式开发
    shiro认证-SSM
    Shiro入门
    Springmvc之文件上传
  • 原文地址:https://www.cnblogs.com/daniell003/p/3441860.html
Copyright © 2011-2022 走看看