sum all input elements in jquery

后端 未结 1 1477
滥情空心
滥情空心 2020-12-21 05:21

Trying to figure out how to write a jquery formula that will sum all input fields that begin with \"pull\" on keyup... I\'m trying the code below, but nothing happens... No

相关标签:
1条回答
  • 2020-12-21 06:02

    Try:

    $("input[name^='pull']").bind("keyup", calcPullTotal);
    calcPullTotal();
    

    You were passing the string "calcPullTotal" as the second argument to bind, which expects a function.

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