Heim >Web-Frontend >js-Tutorial >新浪的图片新闻效果_javascript技巧

新浪的图片新闻效果_javascript技巧

WBOY
WBOYOriginal
2016-05-16 19:20:391157Durchsuche
复制代码 代码如下:



新浪的图片新闻效果




 



  

 
    <script> <BR>//-------定义图片路径等参数-------------// <BR>//定义大图的路径, <BR>var bigPic0 ="http://image2.sina.com.cn/book/U1503P167T135D1F4549DT20060629223845.jpg"; <BR>var bigPic1 ="http://image2.sina.com.cn/book/U1503P167T135D1F4552DT20060629223845.jpg"; <BR>var bigPic2 ="http://image2.sina.com.cn/book/U1396P167T135D1F4555DT20060629141338.jpg"; <BR>var bigPic3 ="http://image2.sina.com.cn/book/U1396P167T135D1F4558DT20060628170108.jpg"; <BR>//小图路径 <BR>var smallPic0 ="http://image2.sina.com.cn/book/U1503P167T135D1F4548DT20060629223845.jpg"; <BR>var smallPic1 ="http://image2.sina.com.cn/book/U1503P167T135D1F4551DT20060629223845.jpg"; <BR>var smallPic2 ="http://image2.sina.com.cn/book/U1396P167T135D1F4554DT20060629141338.jpg"; <BR>var smallPic3 ="http://image2.sina.com.cn/book/U1396P167T135D1F4557DT20060628170108.jpg"; <BR>//大图的点击后的URL <BR>var PicURL0 ="http://www.jb51.net"; <BR>var PicURL1 ="http://www.jb51.net"; <BR>var PicURL2 ="http://www.jb51.net"; <BR>var PicURL3 ="http://www.jb51.net"; <BR>//标题 <BR>var t0="搞笑节目《玩转世界杯》第9期:情陷解说门"; <BR>var t1="音频:黄健翔激情解说搞笑版大全"; <BR>var t2="Play Girl(网络宝贝)X计划"; <BR>var t3="《Memory》爱情是一个迷"; <BR>//描述 <BR>var describe0="小马派出密探零零发前往德国世界杯现场,调查“解说门”事件真相……"; <BR>var describe1="黄健翔是公认的中国足球评论员第一人;他,曾骄傲地宣称自己的解说就是行业标准……"; <BR>var describe2="你也能成为聚万千艳羡于一身的游戏MM,PlayGirl X计划,将你打造成游戏巅峰最耀眼的明星。"; <BR>var describe3="怎样的爱情可以真实地握在手中?这样的爱情是真实还是虚幻?"; <BR>// <BR>var t=t0+"[|]"+t1+"[|]"+t2+"[|]"+t3; <BR>var bigPicURL=bigPic0+"[|]"+bigPic1+"[|]"+bigPic2+"[|]"+bigPic3; <BR>var smallPicURL=smallPic0+"[|]"+smallPic1+"[|]"+smallPic2+"[|]"+smallPic3; <BR>var PicURL=PicURL0+"[|]"+PicURL1+"[|]"+PicURL2+"[|]"+PicURL3; <BR>var describe = describe0+"[|]"+describe1+"[|]"+describe2+"[|]"+describe3; <BR>// <BR>document.write("\<BR><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='535' height='356' ID=FSCommand NAME='focus_one' align='middle'>\ <BR><param name='allowScriptAccess' value='sameDomain' />\ <BR><param name='movie' value='http://www.jb51.net/demo/flash/bnfocus.swf' />\ <BR><param name='FlashVars' value='bigPicURL=" + bigPicURL + "&smallPicURL=" + smallPicURL + "&t="+t+"&PicURL="+PicURL+"&describe="+describe+"'/>\ <BR><param name='quality' value='high' />\ <BR><param name='bgcolor' value='#ffffff' />\ <BR><embed src='http://www.jb51.net/demo/flash/bnfocus.swf' FlashVars='bigPicURL=" + bigPicURL + "&smallPicURL=" + smallPicURL + "&t="+t+"&PicURL="+PicURL+"&describe="+describe+"' quality='high' bgcolor='#ffffff' width='535' height='356' name='focus' swLiveConnect='true' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />\ <BR>\ <BR>"); <BR></script> 



由于编辑器的问题,每个>\后面都有个空格,可以删掉就可以了
给个正确的吧 看这个就知道了
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn