For what it's worth I just came across this nasty issue in < IE9
say you have some html like this:
and for some reason (I had a good one) you need to retrieve all HTML in the table before the last closing TR you might try something like this:
var tableHtml = document.getElementById('thetable').innerHTML;
var fragment = tableHtml.substring(0, tableHtml.lastIndexOf(''));
< IE9 will return nothing (-1) here because the tableHtml variable contains all html tags upper-cased and lastIndexOf is case sensitive. To get around this I had to throw in a toLowerCase() before lastIndexOf.