JQuery and 'this' object

后端 未结 5 2095
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-03 00:14

I have the following JQuery function being attached to the blur event of n textboxes on a webpage.

$(document).ready(function() {
        $(\"input[id$=\'_tx         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-03 00:48

    this = DOM element

    $(this) = jQuery'ified

    Typically I use plain old JavaScript where I can. The jQuery alternative in this instance is $(this).val() - I don't see the need for it.

提交回复
热议问题