Is there a problem with setting document.body.innerHTML?
My code does the following:
var bodyText = document.body.innerHTML;
document.body.innerHTML = "";
document.body.innerHTML = bodyText;
At first innerHTML is set to "<A name=top><script language=Javascript1.2>start_menu();</script>xxxxx..."
In a debugger I see that bodytext is set the proper string.
Next I see innerHTML = "" and bodyText is still correct.
Finally bodyText is still correct but innerHTML is set to "<A name=top>xxxxx..."
Why was the <script> part removed?
My code does the following:
var bodyText = document.body.innerHTML;
document.body.innerHTML = "";
document.body.innerHTML = bodyText;
At first innerHTML is set to "<A name=top><script language=Javascript1.2>start_menu();</script>xxxxx..."
In a debugger I see that bodytext is set the proper string.
Next I see innerHTML = "" and bodyText is still correct.
Finally bodyText is still correct but innerHTML is set to "<A name=top>xxxxx..."
Why was the <script> part removed?