日期:2014-05-18  浏览次数:20686 次

innerHTML的疑问?
parseFloat(document.getElementById( "sunSum ").innerHTML);
对这种写法感到奇怪,应该是
parseFloat(document.getElementById( "sunSum ").innerText);才对吧。innerHTML不是把标记也包括了吗?有怎么能parseFloat?

------解决方案--------------------
innerHTML和innerText都可用吧