Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript how to get the elements in event? Reply To: how to get the elements in event?

#171382
singlexyz
Participant

Aha…I think the code is easy to confused.

here’s what I want:
var checkbox = $(‘input[name=a]‘);
checkbox.on(‘change’,function(e){
// I want to get the checkbox again.
// but can I get that without var checkbox = ….?
// $(this) means the elements which onchange, not the collect.
});

XD