--:其实验证码,也可以用这个方式输出的哦 < html > < head > < meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" /> < title > 走走看看 </ title > < script language ="JavaScript" > ... function ImgArray(len) ...{ this.length=len; }var ImgName=new ImgArray();if (window.ActiveXObject && !window.XMLHttpRequest)...{ window.XMLHttpRequest = function() ...{ var MSXML = ['Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP']; for (var i = 0; i < MSXML.length; i++) ...{ try ...{ return new ActiveXObject(MSXML[i]); } catch (e) ...{}}return null;};}function AjaxUpdate()...{ var xmlHttp = new XMLHttpRequest(); xmlHttp.open("GET","慢慢散步" true); xmlHttp.onreadystatechange=function() ...{ if (xmlHttp.readyState==4&&xmlHttp.status==200) ...{ try ...{ var _xiaozhu=Http.responseText; ImgName=_xiaozhu.split(","); } catch(err) ...{ } } } xmlHttp.send();} var t=0; function playImg() ...{ if (t==9) ...{ t=0; } else ...{ t++; } img.style.filter="blendTrans(Duration=0)";//设置切换模式0,没有切换模式,1以后有淡入淡出的模式 img.filters[0].apply(); img.src=ImgName[t]; img.filters[0].play(); mytimeout=setTimeout("playImg()",5000); } </ script > </ head > < style > ... body img{...}{border:3 gold ridge} </ style > < body bgcolor ="#FFFFFF" text ="#000000" onload ="AjaxUpdate()" > < img src ="0.jpg" name ="img" onclick ="return playImg()" > </ body > </ html >