G
Guest
I have develop a on-line dictionary website, http://www.stardict.org
I meet a problem:
Here is two lines of js codes:
document.getElementById("wordlist").innerHTML = "";
document.getElementById("definition").innerHTML = "line1<br>line2";
The corresponding html codes are:
<table width="100%">
<tr>
<td width="25%" valign="top"><div id="wordlist" width="100%" style='
overflow-y:auto; height:352px;'></div></td>
<td width="8" bgcolor="#888888"></td>
<td width="75%" valign="top"><div id="definition" width="100%" style='
overflow-y:auto; height:352px;'></div></td>
</tr>
</table>
But I will find only the first line1 is showed, you can't see line2. By
alert(document.getElementById("definition").innerHTML) you can find the
content is right. If comment the first line which set wordlist's
innerHTML, the result will be shown correctly.
This problem only happen in IE. It is correct in firefox. Is this IE6's bug?
Any one can help me to fix the problem? Thanks!
I meet a problem:
Here is two lines of js codes:
document.getElementById("wordlist").innerHTML = "";
document.getElementById("definition").innerHTML = "line1<br>line2";
The corresponding html codes are:
<table width="100%">
<tr>
<td width="25%" valign="top"><div id="wordlist" width="100%" style='
overflow-y:auto; height:352px;'></div></td>
<td width="8" bgcolor="#888888"></td>
<td width="75%" valign="top"><div id="definition" width="100%" style='
overflow-y:auto; height:352px;'></div></td>
</tr>
</table>
But I will find only the first line1 is showed, you can't see line2. By
alert(document.getElementById("definition").innerHTML) you can find the
content is right. If comment the first line which set wordlist's
innerHTML, the result will be shown correctly.
This problem only happen in IE. It is correct in firefox. Is this IE6's bug?
Any one can help me to fix the problem? Thanks!