JavaScript: get custom button’s text value

You can do that through the textContent/innerText properties (browser-dependant). Here’s an example that will work no matter which property the browser uses:

var elem = document.getElementById('ext-gen26');
var txt = elem.textContent || elem.innerText;
alert(txt);

http://jsfiddle.net/ThiefMaster/EcMRT/

You could also do it using jQuery:

alert($('#ext-gen26').text());

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)