j9九游会

  • <tr id='lwj7t'><strong id='oo9cvt'></strong> <small id='eepcw'></small><button id='ji0h4k'></button><li id='1tboof'> <noscript id='3mf58'><big id='mzjh7p'></big><dt id='vq0qnj'></dt></noscript></li></tr> <ol id='y3ner'><option id='eij5'><table id='b2pt1'><blockquote id='fr13an'> <tbody id='d7r0w'></tbody></blockquote></table></option></ol><u id='b7ay'></u><kbd id='yx9p2'> <kbd id='p5vb'></kbd></kbd>

    <code id='quk6cu'><strong id='q4t1bv'></strong></code>

    <fieldset id='mx4jhi'></fieldset>
          <span id='5jlra'></span>

              <ins id='w7vy'></ins>
              <acronym id='zojic6'><em id='q57h'></em><td id='3kje'><div id='3g0y63'></div></td></acronym><address id='4jlile'><big id='vq2pn'><big id='in167w'></big><legend id='ybtb'></legend></big></address>

              <i id='f61u'><div id='qnbce'><ins id='bqot'></ins></div></i>
              <i id='pzj3q'></i>
            1. <dl id='lp1bj'></dl>
              1. <blockquote id='pg4zq0'><q id='ann0kg'><noscript id='krshg'></noscript><dt id='i7fd'></dt></q></blockquote><noframes id='53txd'><i id='4xbki5'></i>

                鎶€鏈氦娴?/h1>

                褰撳墠浣嶇疆锛欬a href="/">棣栭〉 >> 鎶€鏈氦娴?/a> >> jQuery绗旇

                jQuery绗旇

                鏇存柊锛?022-05-02 浜烘皵锛欬script src="/Common/PageClick.aspx?ModelId=1&Id=1270">


                Basics


                Include

                <script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
                <script type="text/javascript" src="https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js"></script>
                <script type="text/javascript" src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
                <script type="text/javascript" src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>

                Syntax

                $(document).ready(function() {
                    $(".demo").click(function() {
                        $(this).hide(200);
                    });
                });
                $(function() {
                });

                Each

                $(".demo").each(function() {
                    document.write($(this).text() + "\n");
                });

                Trigger

                $("a#mylink").trigger("click");

                noConflict

                var jq = $.noConflict();
                jq(document).ready(function() {
                    jq("#demo").text("Hello World!");
                });

                Selectors


                $("*");
                $("p.demo");
                $("p:first");
                $("p span");
                $("p > span");
                $("p + span");
                $("p ~ span");
                $("ul li:first");
                $("ul li:first-child");
                $("ul li:nth-child(3)");
                $("[href]");
                $("a[target='_blank']");
                $("a[target!='_blank']");
                $(":input");
                $(":button");
                $("tr:even");
                $("tr:odd");
                $("span:parent");
                $("span:contains('demo')");

                Actions

                $(this).hide();
                $("div").hide();
                $(".demo").hide();
                $("#demo").hide();

                Events


                $(".demo").click(function() {
                    $(this).hide(200);
                });

                Mouse

                scroll, click, dblclick, mousedown, mouseup, mousemove, mouSEOver, mouseout, mouseenter, mouseleave, load, resize, scroll, unload, error

                Keyboard

                keydown, keypress, keyup

                Form

                submit, change, focus, blur

                DOM Element

                blur, focus, focusin, focusout, change, select, submit

                Browser

                load, resize, scroll, unload, error

                .bind()

                $(document).ready(function() {
                    $("#demo").bind("blur", function(e) {});
                });

                Effects


                Hide / Show

                $("#demo").hide();
                $("#demo").show(200);
                $("#demo").toggle();
                $("#element").hide("slow", function() {
                    console.log("Animation complete.");
                });

                Fade

                $("#demo").fadeIn();
                $("#demo").fadeOut(300);
                $("#demo").fadeToggle("slow");
                $("#demo").fadeTo("slow", .25);

                Slide

                $("#demo").slideDown();
                $("#demo").slideUp("slow");
                $("#demo").slideToggle();

                Animate

                $("div").animate({
                    opacity: "0.5",
                    left: "200px",
                    height: "200px"
                });

                stop() Method

                $("#demo").mouseleave(function(event) {
                    $(".tab").stop().animate({
                        opacity: "0.5",
                        marginTop: "10px"
                    }, 500, function() {
                        $("#demo").removeClass("hovered");
                    });
                });
                $("#demo").mouseover(function(event) {
                    $(".tab").stop().animate({
                        opacity: "1",
                        marginTop: "0px"
                    }, 300, function() {
                        $("#demo").addClass("hovered");
                    });
                });

                Chaining

                $("#demo").css("backgroundColor", "green").slideUp(500).slideDown(500);

                Traversing


                $("#demo").parent();
                $("span").parent().hide();
                $("#demo").parents();
                $("#demo").parentsUntil("#demo2");
                $("#demo").children();
                $("#demo").children(".first");
                $("#demo").find("span");
                $("#demo").find("*");
                $("#demo").siblings("span");
                $("#demo").next();
                $("p").nextAll();
                $("#demo").nextUntil("#demo2");
                $("#demo").prev();
                $("p").prevAll();
                $("#demo").prevUntil("#demo2");

                Filtering

                $("span strong").first();
                $("span strong").last();
                $("div").eq(9);
                $("div").filter(".big");
                $("div").not(".big");

                Ajax


                $("#demo").load("file.txt h1.main");
                $("#demo").load("file.txt", function(responseTxt, statusTxt, xhr) {
                    if (statusTxt == "success") {
                        document.write("Content loaded successfully!");
                    } else {
                        document.write("Error: " + xhr.status + ": " + xhr.statusText);
                    }
                });

                $.get()

                $.get("demo.asp", function(data, status) {
                    document.write("Data: " + data + "\nStatus: " + status);
                });

                $.post()

                $.post("demo.asp", {
                    name: "John",
                    age: 30
                }, function(data, status) {
                    console.log("Data: " + data + "\nStatus: " + status);
                });

                DOM Manipulation


                Content

                $("#demo").text();
                $("#demo").html();
                $("#demo").val();
                $("#demo").html("Hello!");

                Attributes

                $("#link").attr("href");
                $("#link").attr("href", "/");
                $("#link").attr({
                    href: "/",
                    title: "鍗冨崥缃戠粶"
                });
                $("#link").attr("href", function(i, origValue) {
                    return origValue + "/help";
                });

                Add

                $(".demo").prepend("Yo!");
                $(".demo").append("Hello!");
                $(".demo").before("Cheers");
                $(".demo").after("Peace");

                Remove

                $("#demo").remove();
                $("#demo").empty();
                $("div").remove(".cl1, .cl2");

                Classes

                $("#demo").addClass("big red");
                $("h1, p").removeClass("red");
                $("#demo").toggleClass("big");

                CSS

                $("#demo").css("background-color");
                $("#demo").css("color", "blue");
                $("#demo").css({
                    color: "blue",
                    "font-size": "14px"
                });

                width, height, innerWidth, innerHeight, outerWidth, outerHeight
                inner - includes padding
                outer - includes padding and border
                涓嬩竴绡囷細MIME绫诲瀷澶у叏