Possible Duplicate:
InnerText alternative in mozilla
I have this code
<div id="code">My program<br />It is here!</div>
<script type="text/javascript">
var program=document.getElementById('code');
ShowLMCButton(program.innerText);
</script>
It works in IE but in firefox, innerText does not work. How can I use this in firefox? I have tried .text() but it doesn't want to work! I need the text to be in the form "My program\n It is here!" It can't be textContent because that copies the html tags.
What this is, is to copy a VB script from a site and paste it straight into a program and it must include all the new lines, white space etc.
ShowLMCButton() is a script that is "Click to Copy" - http://www.lettersmarket.com/view_blog/a-3-copy_to_clipboard_lmcbutton.html