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

      <legend id='gv9R0'><style id='gv9R0'><dir id='gv9R0'><q id='gv9R0'></q></dir></style></legend>
      1. <small id='gv9R0'></small><noframes id='gv9R0'>

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

        Jquery/JS 绑定“粘贴"输入文本框的事件处理程

        时间:2023-09-05
        • <bdo id='eDt40'></bdo><ul id='eDt40'></ul>

            <tfoot id='eDt40'></tfoot>

          • <legend id='eDt40'><style id='eDt40'><dir id='eDt40'><q id='eDt40'></q></dir></style></legend>

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

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

                  本文介绍了Jquery/JS 绑定“粘贴"输入文本框的事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  好的,所以我有一个输入框,每次更改时我都需要做一些事情,我在鼠标粘贴时遇到了麻烦.这是我的代码

                  Allright, SO i have an input box and I need to do things everytime it changes, I am having trouble doing it for mouse paste. Here is the code I have

                  $("#attack-navy"+unit.ID+"-number").bind('paste', function(){
                              alert("paste detected");
                              $("#attack-max-capacity").text(getMaxCapacity());
                  });
                  

                  getMaxCapacity() 函数现在返回输入的数字 * 30;

                  the getMaxCapacity() function return number entered * 30 for now;

                  这是当
                  1:我粘贴了 3,它不会改变(我仍然看到警报)
                  2:那么当我粘贴 5 时,它将是 90(3 * 30)
                  3:那么如果我粘贴 10,它将是 150(5 * 30),依此类推.

                  Here is the scenario when
                  1: I paste 3, it will not change (i still see the alert)
                  2: Then when i paste 5, it will be 90(3 * 30)
                  3: Then if i paste 10 it will be 150(5 * 30), and so on.

                  我认为它在粘贴实际发生之前执行处理程序.关于我能做什么的任何想法?(.change 不起作用,它必须在你粘贴后立即发生)

                  I think its doing the handler before the paste actually occurs. Any ideas on what I can do? (.change will not work, it must happen as soon as u paste)

                  推荐答案

                  您应该处理 inputpropertychange 事件.
                  演示.

                  You should handle the input and propertychange events.
                  Demo.

                  这篇关于Jquery/JS 绑定“粘贴"输入文本框的事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:jQuery 的香草 JavaScript 版本 .click 下一篇:将多个键绑定到 Keypress 事件

                  相关文章

                  最新文章

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

                  2. <tfoot id='MC9co'></tfoot>

                    1. <legend id='MC9co'><style id='MC9co'><dir id='MC9co'><q id='MC9co'></q></dir></style></legend>

                    2. <small id='MC9co'></small><noframes id='MC9co'>

                        <bdo id='MC9co'></bdo><ul id='MC9co'></ul>