Special effects on image switching implemented by JS on the Skynet software channel
Last Update:2018-12-07
Source: Internet
Author: User
<SCRIPT>
VaR widths = 282;
VaR heights = 164;
VaR counts = 6;
Img1 = new image (); img1.src = 'uploadfile/jscode/2007729214812897.jpg ';
Img2 = new image (); img2.src = 'uploadfile/jscode/2007729214813293.jpg ';
Img3 = new image (); img3.src = 'uploadfile/jscode/2007729214814549.jpg ';
Img4 = new image (); img4.src = 'uploadfile/jscode/2007729214814651.jpg ';
Img5 = new image (); img5.src = 'uploadfile/jscode/2007729214815914.jpg ';
Img6 = new image (); img6.src = 'uploadfile/jscode/2007729214816449.jpg ';
Url1 = new image (); url1.src = 'HTTP: // www.memoon.cn ';
Url2 = new image (); url2.src = 'HTTP: // www.memoon.cn ';
Url3 = new image (); url3.src = 'HTTP: // www.memoon.cn ';
Url4 = new image (); url4.src = 'HTTP: // www.memoon.cn ';
Url5 = new image (); url5.src = 'HTTP: // www.memoon.cn ';
Url6 = new image (); url6.src = 'HTTP: // www.memoon.cn ';
// Tian Ji Yi is always original
VaR nn = 1;
Var key = 0;
Function change_img ()
{If (Key = 0) {key = 1 ;}
Else if (document. All)
{Document. getelementbyid ("pic "). filters [0]. apply (); document. getelementbyid ("pic "). filters [0]. play (duration = 2 );}
Eval ('document. getelementbyid ("pic"). src = IMG '+ nn +'. src ');
Eval ('document. getelementbyid ("url"). href = url' + nn + '. src ');
For (VAR I = 1; I <= counts; I ++) {document. getelementbyid ("xxjdjj" + I). classname = 'axx ';}
Document. getelementbyid ("xxjdjj" + nn). classname = 'bxx ';
Nn ++; If (NN> counts) {nn = 1 ;}
Tt = setTimeout ('change _ IMG () ', 4000 );}
Function changeimg (n) {nn = N; window. clearinterval (TT); change_img ();}
Document. Write ('<style> ');
Document. Write ('. axx {padding: 1px 7px; border-left: # cccccc 1px solid ;}');
Document. write ('a. axx: Link,. axx: visited {text-Decoration: none; color: # FFF; line-Height: 12px; Font: 9px sans-serif; Background-color: #666 ;}');
Document. write ('a. axx: active,. axx: hover {text-Decoration: none; color: # FFF; line-Height: 12px; Font: 9px sans-serif; Background-color: #999 ;}');
Document. Write ('. bxx {padding: 1px 7px; border-left: # cccccc 1px solid ;}');
Document. write ('a. bxx: Link,. bxx: visited {text-Decoration: none; color: # FFF; line-Height: 12px; Font: 9px sans-serif; Background-color: # d34600 ;}');
Document. write ('a. bxx: active,. bxx: hover {text-Decoration: none; color: # FFF; line-Height: 12px; Font: 9px sans-serif; Background-color: # d34600 ;}');
Document. Write ('</style> ');
Document. write ('<Div style = "width:' + widths + 'px; Height: '+ heights + 'px; overflow: hidden; text-overflow: Clip; "> ');
Document. write ('<div> <a id = "url"> </a> </div> ');
Document. write ('<Div style = "filter: alpha (style = 1, opacity = 10, finishopacity = 80); Background: #888888; width: 100%-2px; text-align: right; top:-12px; position: relative; margin: 1px; Height: 12px; padding: 0px; margin: 0px; Border: 0px; "> ');
For (VAR I = 1; I <counts + 1; I ++) {document. write ('<a href = "javascript: changeimg (' + I + '); "id =" xxjdjj '+ I +' "class =" axx "target =" _ Self "> '+ I +' </a> ');}
Document. Write ('</div> ');
Change_img ();
</SCRIPT>