html - Javascript textContent is not working in IE8 or IE7 -


i need add 2 cell content of table , display it. below javascript command works fine in chrome or ie10. but not working in ie8 or 7.

parsefloat(document.getelementbyid("total").textcontent).tofixed(2); 

it results,

nan

could please tell me equivalent command in ie7 or ie8 read cell content of table , convert float add..

textcontent not supported ie7/8. latter has different property called innertext returns text contents of dom node.

here how use both:

var text  = e.item.textcontent || e.item.innertext; alert(text); 

note: e html element


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

visual studio - TFS will not accept changes I've made to a Java project -