用ASP程序修改JS代码内容
以下是一段JS显示图片程序代码。我想修改里面图片的链接地址http://www.163.com。用ASP程序修改成别的任意网址,不知能不能行啊~?高手求助!有代码最好!谢...
以下是一段JS显示图片程序代码。我想修改里面图片的链接地址http://www.163.com 。用ASP程序修改成别的任意网址,不知能不能行啊~?高手求助!有代码最好!谢了!------以下是 JS代码 是在 js文件夹下的
var nHangNo = (Math.floor((Math.random()) * 1000) % 7) + 1;
var nSecondHangNo = 0;
var isHangSecondCheck = 0;
var nHangInterval = 4000;
var nHangNoOld = nHangNo;
var objHanger = document.getElementById("divHanger");
var aHtmls = new Array (
"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/1.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/2.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/3.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/4.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/5.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/6.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/7.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/8.jpg' border=0></a>"
);
function getNavigatorType()
{
if (navigator.appName == "Microsoft Internet Explorer") return 1;
else if (navigator.appName == "Netscape") return 2;
else return 0;
}
function rotateHanger()
{
if (getNavigatorType() == 1) {
objHanger.filters[0].apply();
setHanger();
objHanger.filters[0].play();
} else {
setHanger();
}
nHangNoOld = nHangNo;
if (isHangSecondCheck == 0) {
nHangNo = nSecondHangNo;
isHangSecondCheck = 1;
} else {
(nHangNo==(aHtmls.length-1))?nHangNo=0:nHangNo++;
}
/**/
nRotateTimer = setTimeout('rotateHanger()',nHangInterval);
}
function restartRotate()
{
(nHangNo==(aHtmls.length-1))?nHangNo=0:nHangNo++;
nRotateTimer = setTimeout('rotateHanger()',nHangInterval);
}
function changeHanger(nGotoNo)
{
nHangNo = nGotoNo;
if (getNavigatorType() == 1) {
objHanger.filters[0].apply();
setHanger();
objHanger.filters[0].play();
} else {
setHanger();
}
}
function setHanger()
{
objHanger.innerHTML=aHtmls[nHangNo];
}
rotateHanger(); 展开
var nHangNo = (Math.floor((Math.random()) * 1000) % 7) + 1;
var nSecondHangNo = 0;
var isHangSecondCheck = 0;
var nHangInterval = 4000;
var nHangNoOld = nHangNo;
var objHanger = document.getElementById("divHanger");
var aHtmls = new Array (
"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/1.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/2.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/3.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/4.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/5.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/6.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/7.jpg' border=0></a>"
,"<a href='http://www.163.com' onfocus='this.blur()' target='_blank'><img src='images/8.jpg' border=0></a>"
);
function getNavigatorType()
{
if (navigator.appName == "Microsoft Internet Explorer") return 1;
else if (navigator.appName == "Netscape") return 2;
else return 0;
}
function rotateHanger()
{
if (getNavigatorType() == 1) {
objHanger.filters[0].apply();
setHanger();
objHanger.filters[0].play();
} else {
setHanger();
}
nHangNoOld = nHangNo;
if (isHangSecondCheck == 0) {
nHangNo = nSecondHangNo;
isHangSecondCheck = 1;
} else {
(nHangNo==(aHtmls.length-1))?nHangNo=0:nHangNo++;
}
/**/
nRotateTimer = setTimeout('rotateHanger()',nHangInterval);
}
function restartRotate()
{
(nHangNo==(aHtmls.length-1))?nHangNo=0:nHangNo++;
nRotateTimer = setTimeout('rotateHanger()',nHangInterval);
}
function changeHanger(nGotoNo)
{
nHangNo = nGotoNo;
if (getNavigatorType() == 1) {
objHanger.filters[0].apply();
setHanger();
objHanger.filters[0].play();
} else {
setHanger();
}
}
function setHanger()
{
objHanger.innerHTML=aHtmls[nHangNo];
}
rotateHanger(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询