我正在尝试在刷新时进行简单的文本更改:
<strong>Title</strong>
<p id="myQuote">Slogan</p>
并且“口号”部分在刷新时发生了变化:
var myQuotes = new Array();
myQuotes[0] = "To be or not to be";
myQuotes[1] = "The only thing we have to fear is fear itself";
myQuotes[2] = "Give me liberty or give me death";
var myRandom = Math.floor(Math.random()*myQuotes.length);
$('#myQuote').html(myQuotes[myRandom]);