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

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -