I have some JavaScript that works fine in IE and Opera, but not Firefox.
The issue seems to be that Firefox is seeing the variable as undefined.
Do I have to declare that variable even though it should be inherited?
Your problem is that you're using document.all, and .innerText, neither of which are standard.
You should be using document.getElementById() to grab items, and .innerHTML to read their contents, if they're not form inputs.
If they are inputs, use .value instead of .innerText
If they are inputs, use .value instead of .innerText
Firfox支持:document.getElementById("c0").textContent
IE支持: document.getElementById("c0").innerText