Need use javascript get a asp.net label text, below javascript works fine for IE and Chrome, but not Firefox, how to make it work for all browsers.
function showThumbnails_OnClick() {
var id = document.getElementById('lblId').innerText;
if (ChkBox.checked) {
location.href = 'Result.aspx?Id=' + id;
}
}
<asp:Label ID="lblId" runat="server" Text="">