Select all the elements <button>, then filter them based on innerHTML:
$('button').filter(function() {
return this.innerHTML == 'Submit';
});
If necessary, you can be more explicit only by selecting the button elements with type="button", although this is slightly less efficient:
$('button[type="button"]').filter(function() {
return this.innerHTML == 'Submit';
});
:
, , div , , ?
, .
var $container = $('.element-that-contains-the-button');
$('button', $container).filter(function() {
return this.innerHTML == 'Submit';
});
$container.find(), .