javascript| Slides
Method:adRotator.initialize (container name ID);
Method:adRotator.add (picture address [, text item] [, link address])
Method:adRotator.play ();
Run Code Box
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" ><HTML><HEAD><TITLE> New Document </ Title><meta name= "generator" content= "EditPlus" ><meta name= "Author" "content=" "><meta NAME=" Keywords "content=" "><meta name=" Description "content=" "></pead><body><div align=" center " ><div id=adrotator></div><input id= "second" ><button >set ><script language= "JavaScript" ><!--function AdRotator () {};adrotator.initialize=function (o) {//SCRIPT by bluedestinythis._t = new Array (); this._l = new Array (); this._p = new Array (); this._i = new Image (); this._c = 0;this._f = False;this._o = O;this._timeout = null;this._html = "";//configration.//@ image width//@ image height//@ Rotator SPE ed//@ Filter Typethis._w = 450;this._h = 450;this._s = 4;this._x = 23;return this; Adrotator.add=function (p,t,l) {with (this) {_p.push (P); _t.push (t); _l.push (L);}}; Adrotator.load=functIon () {with (AdRotator) {if (_i.readystate== ' complete ') {if (_p.length-1==_c) {_f = True;_c = 0;window.cleartimeout (_ Timeout);//getref ("AdRotator"). Innerhtml= "complete"; Adrotator.play (); Else{_c++;getref (_o). innerhtml= "Total Images" + _p.length + ", loading picture" + _c + ' + _i.readystate + "..."; _time Out=window.settimeout (adrotator.load,10)}}else{getref (_o) innerhtml= "Total images" + _p.length + ", loading picture" + _c + ' + _i.readystate + ... '; _timeout=window.settimeout (adrotator.load,10)}}};adrotator.play=function () {with ( AdRotator) {if (_f) {_html = ""; _html + = ' <table style= ' border:1px solid #333333; ><TR><TD style= "Font-size:9pt;font-family:tahoma;font-weight:bold;" > ' _html + + ' <div id= ' rotatorplayer ' + ' style= ' width: ' + _w + ' + '; height: "' + _h + '" ' + ' > ' _html + + ' <a href = "' + (_l[_c]? _l[_c]:" javascript:void (0); ") + ' > '; _html + = ' '; _html + = (_t[_c]? <div align= "center" > ' + (_c+1) + '. ' + _t[_c] + ' </div> '): ' <p></p> ' _html = ' </a> '; _html + = ' </div> '; _html + = ' <div align = "Right" >, for (var i=0 i<_p.length; i++) _html + = ' <span ' + ' style= ' border:1px solid #333333;p adding:1px 5px 1px 5px;height:20px;text-align:center;cursor: ' + (_c==i? (' default;background-color:red; '): ' Hand; ' ') + ' > ' + (i>8? i+1):(' 0 ' + (i+1))) + ' </span> '; _html + = ' </div></td></tr></table> '; GetRef (_o). InnerHTML = _html;getref ("Rotatorpic"). Filters[0]. Apply (); GetRef ("Rotatorpic"). Filters[0]. Play (); next ();} ELSE{_I.SRC = _p[_c];adrotator.load (); Adrotator.next=function () {with (this) {(_p.length-1==_c)? _c=0: _c++;_timeout=window.settimeout (adrotator.play,_s* 1000);}; Adrotator.select=function (i) {with (this) {Window.cleartimeout (_timeoUT); _c=i;adrotator.play ();}; Adrotator.set=function (second) {with (this) {window.cleartimeout (_timeout); if ((/\d+/). Test (second) ==true) {_s= Second;adrotator.play ();} Else{alert ("must be digit!") Adrotator.play ();}}; function GetRef (ID) {return (Document.all?document.all (ID):d Ocument.getelementbyid (ID));} Adrotator.initialize ("AdRotator"); Adrotator.add ("200406301.jpg", "Web instructional Web Slide Special effects code", "Http://www.webjx.com") Adrotator.add ("Http://www.webjx.com/img/200406302.jpg") Adrotator.add ("200406303.jpg") Adrotator.add ("200406304"). JPG ") adrotator.add (" 200406305.jpg ") Adrotator.play ();//--></script></body></ptml>
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]