How to get javascript control from JQuery object?

后端 未结 4 1191
说谎
说谎 2021-02-12 23:16

I\'m a beginner in JQuery,

How can I get the control as a javascript object from a JQuery object

var _object = $(this). ??
4条回答
  •  遥遥无期
    2021-02-12 23:30

    Most common var _object = $(this)[0];

    If you have more than 1 elements matched: $(this)[0], $(this)[1], $(this)[2] and so on.

    $(this).get() is also possible. It's only advantage over the array model is that it allows selection of the kind $(this).get(-1) where it gets you the last matched object

提交回复
热议问题