picture.js文件:
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="1.jpg";
imgLink[1]="http://www.******.htm";
imgUrl[2]="2.jpg";
imgLink[2]="http://www.*****.htm";
imgUrl[3]="3.jpg";
imgLink[3]="http://www.****.htm";
imgUrl[4]="4.jpg";
imgLink[4]="http://www.chuguo**********.htm";
var imgPre=new Array();
for (i=1;i <4;i++){
imgPre[i]=new Image();
imgPre[i].src=imgUrl[i];
}
function setTransition(){
if (document.all){
imgUrlrotator.filters.revealTrans.Transition=Math.floor(Math.random()*20);
imgUrlrotator.filters.revealTrans.apply();
}
} function playTransition(){
if (document.all)
imgUrlrotator.filters.revealTrans.play()
}
function nextAd(){
if(adNum <imgUrl.length-1)adNum++ ;
else adNum=1;
setTransition();
document.all.imgUrlrotator.src=imgUrl[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 6000);
} function jump2url(){
jumpUrl=imgLink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
return false;
}
function displayStatusMsg() {
status=imgLink[adNum];
document.returnValue = true;
}
aspx文件:
<%@ Register TagPrefix="uc1" TagName="simplenews" Src="simplenews.ascx" %>
<%@ Register TagPrefix="uc1" TagName="BulletinFirstFace" Src="BulletinFirstFace.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server" >
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="JavaScript" src="../Script/picture.js"> </script>
<title>新闻管理 </title> </head>
<body > <form runat=server>
<table width="831" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="260" rowspan="2" valign="top"> <img src = "javascript:nextAd()" id="imgUrlrotator" width=260 height=200 hspace="0" vspace="0" border=0 style="FILTER: revealTrans(duration=2,transition=20);" alt ="xxx"/> </td>
<td width="425" height="25" valign="top" background="images/index_01.gif"> </td>
<td width="146" rowspan="4" valign="top"> <img src="images/index_05.jpg" width="146" height="660" /> </td>
</tr>
<tr>
<td height="170" valign="top"> <uc1:simplenews id="Simplenews1" runat="server"> </uc1:simplenews>
</td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" background="images/index_09.jpg"> </td>
</tr>
<tr>
<td height="440" colspan="2" valign="top"> <uc1:BulletinFirstFace id="BulletinFirstFace1" runat="server"> </uc1:BulletinFirstFace>
</td>
</tr>
</table>
</form>
</body>
</html> img src那块为何显示不出来啊?
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="1.jpg";
imgLink[1]="http://www.******.htm";
imgUrl[2]="2.jpg";
imgLink[2]="http://www.*****.htm";
imgUrl[3]="3.jpg";
imgLink[3]="http://www.****.htm";
imgUrl[4]="4.jpg";
imgLink[4]="http://www.chuguo**********.htm";
var imgPre=new Array();
for (i=1;i <4;i++){
imgPre[i]=new Image();
imgPre[i].src=imgUrl[i];
}
function setTransition(){
if (document.all){
imgUrlrotator.filters.revealTrans.Transition=Math.floor(Math.random()*20);
imgUrlrotator.filters.revealTrans.apply();
}
} function playTransition(){
if (document.all)
imgUrlrotator.filters.revealTrans.play()
}
function nextAd(){
if(adNum <imgUrl.length-1)adNum++ ;
else adNum=1;
setTransition();
document.all.imgUrlrotator.src=imgUrl[adNum];
playTransition();
theTimer=setTimeout("nextAd()", 6000);
} function jump2url(){
jumpUrl=imgLink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '')window.open(jumpUrl,jumpTarget);
else location.href=jumpUrl;
}
return false;
}
function displayStatusMsg() {
status=imgLink[adNum];
document.returnValue = true;
}
aspx文件:
<%@ Register TagPrefix="uc1" TagName="simplenews" Src="simplenews.ascx" %>
<%@ Register TagPrefix="uc1" TagName="BulletinFirstFace" Src="BulletinFirstFace.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server" >
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language="JavaScript" src="../Script/picture.js"> </script>
<title>新闻管理 </title> </head>
<body > <form runat=server>
<table width="831" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="260" rowspan="2" valign="top"> <img src = "javascript:nextAd()" id="imgUrlrotator" width=260 height=200 hspace="0" vspace="0" border=0 style="FILTER: revealTrans(duration=2,transition=20);" alt ="xxx"/> </td>
<td width="425" height="25" valign="top" background="images/index_01.gif"> </td>
<td width="146" rowspan="4" valign="top"> <img src="images/index_05.jpg" width="146" height="660" /> </td>
</tr>
<tr>
<td height="170" valign="top"> <uc1:simplenews id="Simplenews1" runat="server"> </uc1:simplenews>
</td>
</tr>
<tr>
<td height="25" colspan="2" valign="top" background="images/index_09.jpg"> </td>
</tr>
<tr>
<td height="440" colspan="2" valign="top"> <uc1:BulletinFirstFace id="BulletinFirstFace1" runat="server"> </uc1:BulletinFirstFace>
</td>
</tr>
</table>
</form>
</body>
</html> img src那块为何显示不出来啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货