成为健身教练要多少钱:应该怎么改这段代码?

来源:百度文库 编辑:高考问答 时间:2024/05/09 14:56:05
<SCRIPT>
var picture1="v1.jpg"
var picture2="v2.jpg"
var picture3="v3.jpg"
var picturewidth=220
var pictureheight=244
</SCRIPT>
<SCRIPT>
if (document.all) {
document.write('<OBJECT ID="DAControl_Wipe" ')
document.write('STYLE="width:'+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('</OBJECT>')
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");
whatPictures = new Array();
whatPictures[0] = m.ImportImage(picture1);
whatPictures[1] = m.ImportImage(picture2);
forward = m.Interpolate(0, 1, 3);
back = m.Interpolate(1, 0, 2);
whatMovement = m.Sequence(forward, back).RepeatForever();
whatTransformation.GradientSize = 1.0;
whatTransformation.WipeStyle = 0;
theResult = m.ApplyDXTransform( whatTransformation, whatPictures, whatMovement );
DAControl_Wipe.Image = theResult.OutputBvr;
DAControl_Wipe.Start();
}
</SCRIPT>
我要的是3张图片变变化,这段代码只能2张互相交替,查了一下,网上有关这个效果的全是这段错误代码,奶奶的, 天下程序一大抄。
求救ing!~

<html>
<head>
<style type=text/css>
#divScroller1 {
HEIGHT: 390px;
OVERFLOW: hidden;
POSITION: absolute;
WIDTH: 742px;
Z-INDEX: 9;
visbility: visible;
left: -2px;
top: 11px;
}
.dynPage { COLOR: black; FONT-FAMILY: arial,helvetica,sans-serif; FONT-SIZE: 12px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden; Z-INDEX: 10}
</style>
<script language=JavaScript type=text/javascript>
function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
return this
}
var bw=new lib_bwcheck()

/*** variables to configure... ***/

var numScrollPages = 3 //Set the number of pages (layers) here.
var transitionOut = 1; //The 'out' effect... 0= no effect, 1= fade
var transitionIn = 1; //The 'in' effect... 0= no effect, 1= fade, 2= slide
var slideAcceleration = 0.2; //If you use the slide animation, set this somewhere between 0 and 1.

if(document.layers){ //NS4 resize fix...
scrX= innerWidth; scrY= innerHeight;
onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}
function scrollerobj(obj,nest){
nest = (!nest)?"":'document.'+nest+'.'
this.elm = bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj)
this.css = bw.ns4?this.elm:this.elm.style
this.doc = bw.ns4?this.elm.document:document
this.obj = obj+'scrollerobj'; eval(this.obj+'=this')
this.x = (bw.ns4||bw.opera5)?this.css.left:this.elm.offsetLeft
this.y = (bw.ns4||bw.opera5)?this.css.top:this.elm.offsetTop
this.w = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetWidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelWidth:0
this.h = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetHeight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelHeight:0
}
//object methods...
scrollerobj.prototype.moveTo = function(x,y){
if(x!=null){this.x=x; this.css.left=x}
if(y!=null){this.y=y; this.css.top=y}
}
scrollerobj.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}
scrollerobj.prototype.hideIt = function(){this.css.visibility='hidden'}
scrollerobj.prototype.showIt = function(){this.css.visibility='visible'}

/****************************************************************/

var onlineormyefile = 1;
var activePage = null;
var busy = 0;
function activate(num){
if (activePage!=pages[num] && !busy){
busy = 1;
if (transitionOut==0 || !bw.opacity){ activePage.hideIt(); activateContinue(num); }
else if (transitionOut==1) activePage.blend('hidden', 'activateContinue('+num+')');
}
}
function activateContinue(num){
busy = 1;
activePage = pages[num];
activePage.moveTo(0,0);
if (transitionIn==0 || !bw.opacity){ activePage.showIt(); busy=0; }
else if (transitionIn==1) {
activePage.blend('visible', 'busy=0');
}
else if (transitionIn==3) { activePage.slide(0, slideAcceleration, 40, 'busy=0'); }
//==== 调用变换过程====
startshow(num)
}

//============ 变换设置 ==========
function startshow(num){
if (num == 1)
{ num = 2; }
else
if (num == 2)
{ num = 3; }
else
if (num == 3)
{ num = 1; }
setTimeout('activate('+num+')',1500);
}

scrollerobj.prototype.blend= function(vis, fn){
if (bw.ie5||bw.ie6 && !bw.mac) {
if (vis=='visible') this.css.filter= 'blendTrans(duration=0.9)';
else this.css.filter= 'blendTrans(duration=0.6)';
this.elm.onfilterchange = function(){ eval(fn); };
this.elm.filters.blendTrans.apply();
this.css.visibility= vis;
this.elm.filters.blendTrans.play();
}
else if (bw.ns6 || bw.ie&&!bw.mac){
this.css.visibility= 'visible';
vis=='visible' ? this.fadeTo(100, 7, 40, fn) : this.fadeTo(0, 9, 40, fn);
}
else {
this.css.visibility= vis;
eval(fn);
}
};

var pageslidefadeLoaded = 0;
function initPageSlideFade(){
scroller1 = new scrollerobj('divScroller1');

pages = new Array();
pages[0] = null;
for (var i=1; i<=numScrollPages; i++){
pages[i] = new scrollerobj('dynPage'+i, 'divScroller1');
pages[i].moveTo(0,0);
}
bw.opacity = ( bw.ie && !bw.ie4 && navigator.userAgent.indexOf('Windows')>-1 ) || bw.ns6
if (bw.ie5||bw.ie6 && !bw.mac) pages[1].css.filter= 'blendTrans(duration=0.6)'; // Loads the windows 9.x filters module.
activateContinue(1);

//if (bw.ie) for(var i=0;i<document.links.length;i++) document.links[i].onfocus=document.links[i].blur;
pageslidefadeLoaded = 1;
}
//if the browser is ok, the script is started onload..
if(bw.bw && !pageslidefadeLoaded) onload = initPageSlideFade;
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body>
<table width="600" height="295" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="142"><img src="images/index_left.jpg" width="142" height="504"></td>
<td width="363"><table width="743" height="504" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="743" height="389" valign="top"><div id="Layer1" style="position:absolute; width:743px; height:389px; z-index:1; left: 145px; top: 42px;"><div id=divScroller1>
<div class=dynPage id=dynPage1><img src="images/photo1.jpg" width="743" height="389"></div>
<div class=dynPage id=dynPage2><img src="images/photo2.jpg" width="743" height="389"></div>
<div class=dynPage id=dynPage3><img src="images/photo3.jpg" width="743" height="389"></div>
</div></div></td>
</tr>
</table>
</body>
</html>

你就做个GIF不就行了。

我看也是,弄个GIF得了.非要JAVA代码解决的话,劝你加点儿悬赏分吧。否则大家没动力啊。