zoukankan      html  css  js  c++  java
  • jquery部分实用功能

    '''

    主要目的是回顾相关jquery部分功能

    '''


    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>琦琦的小窝</title>
    <style>
    .title{
    1350px;
    height:150px;
    background-color:red;
    }
    .daohan{
    1350px;
    height:50px;
    background-color:blue;
    }
    .left{
    450px;
    height:1450px;
    background-color:#ddd555;
    float:left;
    }
    .right{
    880px;
    height:1450px;
    background-color:#fff555;
    float:left;
    }
    .hide{
    display:none
    }
    .jiansuo{
    880px;
    height:100px;
    }
    .gotop{
    50px;
    height:50px;
    position:fixed;
    right:0;
    bottom:0;
    </style>
    </head>
    <body>
    <div class="title">琦琦的家园</div>
    <div class="daohan">
    <a>个人简历</a>
    <a>成长故事</a>
    <a>幸福家庭</a>
    <a>快乐瞬间</a>
    </div>
    <div class="left">
    <div class="item">
    <div class="item-title" onclick="fun(this);">标题一</div>
    <div class="item-body">
    <p>内容一</p>
    <p>内容二</p>
    <p>内容三</p>
    </div>
    </div>
    <div class="item">
    <div class="item-title" onclick="fun(this);">标题二</div>
    <div class="item-body hide">
    <p>内容一</p>
    <p>内容二</p>
    <p>内容三</p>
    </div>
    </div>
    <div class="item">
    <div class="item-title" onclick="fun(this);">标题三</div>
    <div class="item-body hide">
    <p>内容一</p>
    <p>内容二</p>
    <p>内容三</p>
    </div>
    </div>
    <div>视频播放</div>
    </div>
    <div class="right">
    <div class="jiansuo">搜狗检索
    <form id="form1" action="https://www.sogou.com/web" method="get">
    <input name="query" type="text">
    <input type="button" value="提交" onclick="Submit();">
    </form>
    </div>
    <div>
    <input type="button" value="全选" onclick="SelectAll();">
    <input type="button" value="取消" onclick="ClearAll();">
    <input type="button" value="反选" onclick="fanAll();">
    <table border="1">
    <tr>
    <td><input type="checkbox"></td>
    <td>123</td>
    </tr>
    <tr>
    <td><input type="checkbox"></td>
    <td>123</td>
    </tr>
    <tr>
    <td><input type="checkbox"></td>
    <td>123</td>
    </tr>
    <tr>
    <td><input type="checkbox"></td>
    <td>123</td>
    </tr>
    </table>
    <input type="button" value="提交" onclick="tijiao();">
    </div>
    </div>
    <div class="jiaobiao"></div>
    <div class="gotop" >
    <a onclick="gotop1();">点我回顶部</a>
    </div>


    <script src="jquery-3.2.1.min.js"></script>
    <script>
    function gotop1(){
    $(window).scrollTop(0);
    }
    function fun(ths){
    $(ths).next().removeClass('hide');
    $(ths).parent().siblings().find('.item-body').addClass('hide')
    }
    function Submit(){
    document.getElementById('form1').submit();
    }
    function SelectAll(){
    $('table :checkbox').prop('checked',true);
    }
    function ClearAll(){
    $('table :checkbox').prop('checked',false);
    }
    function tijiao(){
    alert("提交成功")
    $('table :checkbox').prop('checked',false);
    }
    function fanAll(){
    $('table :checkbox').each(function()
    {
    var ischeck=$(this).prop('checked');
    if (ischeck){
    $(this).prop('checked',false);
    }
    else{
    $(this).prop('checked',true);
    }
    })
    }

    </script>
    </body>
    </html>

  • 相关阅读:
    使用 RemObjects SDK 建立 WebService 应用
    Excel文件读写的.NET开源组件 Koogra Excel BIFF/XLSX Reader Library
    DataSnap 2009 系列之三 (生命周期篇)
    更改SQL Server表所有者的操作方法
    delphi调用cmd的两种方法
    用AndroidX86和VirtualBox打造高性能Android开发环境
    DevExpress 换肤
    Remobjects关于Channel is Busy 错误的解决方法
    关于D7“System.pas not found”错误的解决方法
    40 套漂亮的图标
  • 原文地址:https://www.cnblogs.com/czb529514/p/6896453.html
Copyright © 2011-2022 走看看