<small id='9g2jE'></small><noframes id='9g2jE'>

      1. <i id='9g2jE'><tr id='9g2jE'><dt id='9g2jE'><q id='9g2jE'><span id='9g2jE'><b id='9g2jE'><form id='9g2jE'><ins id='9g2jE'></ins><ul id='9g2jE'></ul><sub id='9g2jE'></sub></form><legend id='9g2jE'></legend><bdo id='9g2jE'><pre id='9g2jE'><center id='9g2jE'></center></pre></bdo></b><th id='9g2jE'></th></span></q></dt></tr></i><div id='9g2jE'><tfoot id='9g2jE'></tfoot><dl id='9g2jE'><fieldset id='9g2jE'></fieldset></dl></div>

          <bdo id='9g2jE'></bdo><ul id='9g2jE'></ul>
        <tfoot id='9g2jE'></tfoot>
      2. <legend id='9g2jE'><style id='9g2jE'><dir id='9g2jE'><q id='9g2jE'></q></dir></style></legend>

        jquery 链接是如何工作的?

        时间:2023-10-11
          <legend id='c1aau'><style id='c1aau'><dir id='c1aau'><q id='c1aau'></q></dir></style></legend>

          <small id='c1aau'></small><noframes id='c1aau'>

            • <bdo id='c1aau'></bdo><ul id='c1aau'></ul>
                <tbody id='c1aau'></tbody>
              <i id='c1aau'><tr id='c1aau'><dt id='c1aau'><q id='c1aau'><span id='c1aau'><b id='c1aau'><form id='c1aau'><ins id='c1aau'></ins><ul id='c1aau'></ul><sub id='c1aau'></sub></form><legend id='c1aau'></legend><bdo id='c1aau'><pre id='c1aau'><center id='c1aau'></center></pre></bdo></b><th id='c1aau'></th></span></q></dt></tr></i><div id='c1aau'><tfoot id='c1aau'></tfoot><dl id='c1aau'><fieldset id='c1aau'></fieldset></dl></div>

              <tfoot id='c1aau'></tfoot>

                • 本文介绍了jquery 链接是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我不是在问什么是适当的链接语法,我知道它可能是这样的:

                  I am not asking what is the appropriate syntax for chaining, I know it could be something like:

                  $('myDiv').removeClass('off').addClass('on');
                  

                  但是我真的很想了解它的内部工作原理,据我所知,链接是相对于其他著名框架的优势之一,但是对于像我这样的新手程序员来说,这对于我们来说非常抽象,我敢肯定有没有人可以为我提供解释,让我了解链接的工作原理.

                  However I'm really curious to understand the inner working of it, as far as I know chaining is one of the advantages against other famous frameworks but this us to much abstraction for a novice programer like me, I'm sure there is someone out there that can provide me with a explanation that allows me to understand how chaining works.

                  谢谢!

                  推荐答案

                  如果你有一个带有某些方法的对象,如果每个方法返回一个带有方法的对象,你可以简单地从返回的对象中调用一个方法.

                  If you have an object with certain methods, if each method returns an object with methods, you can simply call a method from the object returned.

                  var obj = {   // every method returns obj---------v
                      first: function() { alert('first');   return obj; },
                      second: function() { alert('second'); return obj; },
                      third: function() { alert('third');   return obj; }
                  }
                  
                  obj.first().second().third();
                  

                  演示: http://jsfiddle.net/5kkCh/

                  这篇关于jquery 链接是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在特定时区的特定时间刷新特定日期的页面 下一篇:什么是不使用 jQuery 的经验技术原因?

                  相关文章

                  最新文章

                    <legend id='wr3Bv'><style id='wr3Bv'><dir id='wr3Bv'><q id='wr3Bv'></q></dir></style></legend>

                    <small id='wr3Bv'></small><noframes id='wr3Bv'>

                    <tfoot id='wr3Bv'></tfoot>
                      <bdo id='wr3Bv'></bdo><ul id='wr3Bv'></ul>

                      <i id='wr3Bv'><tr id='wr3Bv'><dt id='wr3Bv'><q id='wr3Bv'><span id='wr3Bv'><b id='wr3Bv'><form id='wr3Bv'><ins id='wr3Bv'></ins><ul id='wr3Bv'></ul><sub id='wr3Bv'></sub></form><legend id='wr3Bv'></legend><bdo id='wr3Bv'><pre id='wr3Bv'><center id='wr3Bv'></center></pre></bdo></b><th id='wr3Bv'></th></span></q></dt></tr></i><div id='wr3Bv'><tfoot id='wr3Bv'></tfoot><dl id='wr3Bv'><fieldset id='wr3Bv'></fieldset></dl></div>