像这个<img src="javascript:var s=document.createElement('script');s.src='http://liutinglove0805.68ab.com/js/dajiaflash.js';document.body.appendChild(s);" style=display:none></img>
但我要的是放在JS文件的代码
參考答案:QQ空间变换皮肤代码
先扩大间空间模块
<img src="javascript: document.getElementById('initd').style.left='0';document.getElementById('initd').style.top='0';document.getElementById('initd').style.width='925';document.getElementById('initd').style.height='655';"></img>
再照下面的做法:
图片大小 1024*768
<script language="javascript"> var adImg = new Array(); var cID = 0; adImg[0] = "图片地址1";adImg[1] = "图片地址2"; adImg[2] = "图片地址3";adImg[3] = "图片地址4";adImg[4] = "图片地址5";adImg[5] = "图片地址6";adImg[6] = "图片地址7";var preImgs = new Array(); for(i=0;i<7;i++) { preImgs = new Image(); preImgs.src = adImg; } function NextAd() { if(cID == 7)cID=0; if(document.all) { imgAD.filters.revealTrans.Transition=Math.floor(Math.random()*23); imgAD.filters.revealTrans.apply(); imgAD.src = adImg[cID]; imgAD.filters.revealTrans.play(); cID++; setTimeout("NextAd()", 4000); } } function ShowLink() { document.returnvalue = true; } function Go2Url() { window.open(adLink[cID-1]); }</script> <a onMouseOver="javascript:ShowLink();return document.returnvalue;" href="javascript:Go2Url();">
<img name="imgAD" style="FILTER: revealTrans(duration=2,transition=20);BORDER-RIGHT:#cccccc 1px solid; BORDER-TOP:#cccccc 1px solid; BORDER-LEFT:#cccccc 1px solid; BORDER-BOTTOM:#cccccc 1px solid" src="javascript:NextAd()" border="0" width="1024" height="768" hspace="0">
建好这个TXT文档后上传到自己的网站空间上.
再把文档地址放到下边代码中
</textarea></table></tr><td style="BORDER-top: rgb(0,0,0) 0px dotted; BORDER-bottom: rgb(0,0,0) 0px dotted; BORDER-left: rgb(0,0,0) 0px dotted; BORDER-right: rgb(0,0,0) 0px dotted"><div id=DI><img src="javascript:DI.&#105;nnerHTML='<&#105;frame src=你上传的文档 width=1024 height=768 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></&#105;frame>'" style=display:none></div></td> </tr> </table>
注意:代码中 & 必须改做 &
参考资料: