Try using the right or left function to subtract the length tag from that of innerHTML.