x 是你想要的条数
<script language="JavaScript">
<!-- Hide
var rand1 = Math.floor(Math.random()*x+1))
quotes = new Array
quotes[1] = '123123'
quotes[2] = '12322222'
quotes[3] = '655555555555'
quotes[4] = '666666666'
quotes[5] = '7777777'
quotes[6] = '8888'
quotes[7] = '999'
quotes[8] = '0000'
quotes[9] = '222'
quotes[0] = '111'
....
quotes[x] = '11145345'
var quote = quotes[rand1]
//-->
</script>
应该可以,没尝试~~~
<html><head><meta http-equiv="Content-Type" content="text/htmlcharset=gb2312">
<title>阿里西西网页特效演示,文本随机显示</title>
</head><body>
刷新看看<script language="JavaScript">
<!-- Hide
var a = Math.random() + ""
var rand1 = a.charAt(5)
quotes = new Array
<!-- 修改下面的文字为你需要的文字-->
quotes[1] = '文本内容1'
quotes[2] = '文本内容2'
quotes[3] = '文本内容3'
quotes[4] = '文本内容4'
quotes[5] = '文本内容5'
quotes[6] = '文本内容6'
quotes[7] = '文本内容7'
quotes[8] = '文本内容8'
quotes[9] = '文本内容9'
quotes[0] = '文本内容10'
var quote = quotes[rand1]
//-->
</script>
<script language="JavaScript">
<!-- Hide
document.write(quote)
// -->
</script></body></html>试试看我已经做过测试
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)