• jQuery 可见性过滤选择器


    jQuery 可见性过滤选择器

    直接输入$(':visible')和$(':hidden')会有些好玩的东西;<div></div>是visible的,<span></span>是hidden的;<div />是visible的;

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE html>
    <html>
    <head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <title>b index</title>
    <link rel='stylesheet' type="text/css" href='b/css/bootstrap.css'>
    </head>
    <body style="margin:150px;">
        <h1>this is h1</h1>
        <div id="p1">
            <h2>this is h2</h2>
            <input type="text" >
            <div id="c1">1</div>
            <div id="c2">2
                <div id="cc21">21</div>
                <div id="cc22">22</div>
                <div id="cc23">23</div>
            </div>
            <div id="c3">3</div>
            <div id="c4">d4</div>
            <div id="c5">d5</div>
            <div id="c6"> </div><!-- 有一个空格:empty就找不到了 -->
            <div id="c7"></div>
            <div id="c71"><!-- 这种情况:empty也找不到 --></div>
            <div id="c8"><span></span><span>2</span></div>
            <div id="c9" style="display:none"></div>
        </div>
        <script type="text/javascript" src="js/jquery-1.11.1.js"></script>
        <script type="text/javascript" src="b/js/bootstrap.js"></script>
        <script type="text/javascript" src="js/index021.js"></script>
    </body>
    </html>

  • 相关阅读:
    dd
    VIC流程
    哈哈
    骂人的话 越毒越好不带脏字
    经典笑话大全 一句话超经典
    Struts,Hibernate,Spring经典面试题收藏
    尚学堂java相关
    Java关键字final、static使用总结
    新买了一对充电电池,是该先用光电再充还是先充再用?
    华为boss力荐公司高层看的一篇文章,真的很经典!!![转载]
  • 原文地址:https://www.cnblogs.com/stono/p/4933198.html
Copyright © 2020-2023  润新知