单独运行可以,为什么加到ASP文件中没出现运行效果(文件都UTF-8),动画的都是这样
单独:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<SCRIPT>
var i=0
var i_cell=0
i_bg=0
var linkslist
var bg = new Array('AACC00','77AA00', '557700', '335500', '003300', '000000', '#335500', '557700', '77AA00', 'AACC00', 'CCFF00')
function initObjects() {
if (document.all) {
linkslist = document.all.linkliste.style
linkslist.visibility='VISIBLE'
linkslist.posTop = i
linkslist.posLeft = 53
scrollIE()
}
if (document.layers) {
linkslist = document.linkliste
linkslist.visibility='VISIBLE'
linkslist.top = i
linkslist.left = 53
scrollNN()
}
}
function scrollNN() {
if (i_cell < 100) {
i_cell++
linkslist.top = i--
var timer = setTimeout('scrollNN()',20)
}
else {
clearTimeout('timer')
changebgNN()
}
}
function scrollIE() {
if (i_cell < 100) {
i_cell++
linkslist.posTop = i--
var timer = setTimeout('scrollIE()',20)
}
else {
clearTimeout('timer')
document.bgColor='CCFF00'
changebgIE()
}
}
function changebgNN() {
if (i_bg <= bg.length) {
document.bgColor=bg[i_bg]
i_bg++
var bgagain = setTimeout('changebgNN()',20)
}
else {
clearTimeout('bgagain')
document.bgColor='CCFF00'
i_bg=0
makepauseNN()
}
}
function changebgIE() {
if (i_bg <= bg.length) {
document.bgColor=bg[i_bg]
i_bg++
var bgagain = setTimeout('changebgIE()',50)
}
else {
clearTimeout('bgagain')
i_bg=0
makepauseIE()
}
}
function makepauseNN() {
if (i < (-1*1700)) {
i=0
}
i_cell=0
var scrollagain = setTimeout('scrollNN()',3000)
}
function makepauseIE() {
if (i < (-1*1700)) {
i=0
}
i_cell=0
var scrollagain = setTimeout('scrollIE()',3000)
}
</SCRIPT>
<STYLE>.alldiv {
POSITION: absolute; VISIBILITY: hidden
}
</STYLE>
</head>
<body onload=initObjects()>
<DIV class=alldiv id=linkliste>测试JAVASCRIPT程序</DIV>
</body>
</html>
加到1.asp中,在body的最后加<div>,并设置了top和left属性.
运行没有效果
我的JAVASCRIPT程序涉及动画一综合应用都没效果,不知道为什么