像textarea中显示的文本的滚动新闻提要没有显示在ie中,尽管它在chrome中有效。当我运行它,即它显示textarea但它不显示文本。我要更正的实际网站是:wirqfm.org
<textarea style="text-align: center; font-size: 18px; border-color: rgb(16, 91, 99); resize: none; background-color: rgb(16, 91, 99); color: rgb(255, 211, 78); background-position: initial initial; background-repeat: initial initial;" name="news2" cols="50" rows="3" wrap="virtual" readonly=""></textarea>
</form>
<script language="javascript" type="text/javascript">
document.news.news2.style.background = '105b63';
document.news.news2.style.color = 'FFD34E';
var newsText = new Array();
//initializes the text to be printed
//this is all of the banner text the scrolls across the index.html page
newsText[0] = "Welcome to the WIRQ";
newsText[1] = "The longest running high school radio station in the country providing quality alternative music for over 50 years";
newsText[2] = "Our phone number is now (585) 336-0740. Give us a call if you have ";
var ttloop = 0; // Repeat forever? (1 = True; 0 = False)
var tspeed = 75; // Typing speed in milliseconds (larger number = slower)
var tdelay = 2500; // Time delay between newsTexts in milliseconds
var dwAText, cnews=0, eline=0, cchar=0, mxText;
function doNews() {
mxText = newsText.length - 1; //maximum text length
dwAText = newsText[cnews]; //value of the current news
setTimeout("addChar()",1000)
}
function addNews() {
cnews += 1; //increment current news
if (cnews <= mxText) { //if current news hasn't surpassed the maximum news array length
dwAText = newsText[cnews];
if (dwAText.length != 0) {
document.news.news2.value = ""; //reset text value of the box
eline = 0; //start new line
setTimeout("addChar()",tspeed)
}
}
}
function addChar() {
if (eline!=1) { //if the line isn't finished
if (cchar != dwAText.length) {
nmttxt = "";
for (var k=0; k<=cchar;k++)
nmttxt += dwAText.charAt(k); //put desired amount of characters in the current news
document.news.news2.value = nmttxt;
cchar += 1; //increment the current character
if (cchar != dwAText.length) //if it hasn't reached the message end, append typing symbol
document.news.news2.value += "_";
} else { //if the line has finished, reset the current character and mark that the line is finished
cchar = 0;
eline = 1;
}
if (mxText==cnews && eline!=0 && ttloop!=0) { //if all the news is over, the endline is reached, and looping is on, repeat
cnews = -1; setTimeout("addNews()",tdelay*4);
} else setTimeout("addChar()",tspeed);
} else { //if the line has been MARKED as being finished, show the next news segment
setTimeout("addNews()",tdelay)
}
}
doNews()
</script>