returning sum from server side by json

后端 未结 2 1540
别那么骄傲
别那么骄傲 2021-01-28 02:53

I am adding two text box values by onkey up event. every time data entered, will be submited to the server and then result will be returned by json. I am getting a text box by j

相关标签:
2条回答
  • 2021-01-28 03:16

    Looks to me like your adding the keyup events to the ".submitme" classed elements in the domready, but the firsttextbox isnt yet on the document.

    its added on your #combo's change event so its not getting a keyup event assigned to it.

    0 讨论(0)
  • 2021-01-28 03:25

    When you asynchronously add the combo box (or any element) it does not get the keyup event binding. You have to use .live() like so:

    $(".submitme").live("keyup", function() {
        // stuff
    });
    

    See the jQuery documentation for details on how .live() works.

    0 讨论(0)
提交回复
热议问题