演示网址:http://www.googlephp.cn/demo/demo1.html。
如果觉得有用就继续往下看,否则就PASS掉。
代码如下:
<SCRIPT>
var widths=510; //设置图片宽度
var heights=250; //设置图片高度
var counts=5; //设置图片的个数
img1=new Image ();img1.src='image/1.jpg'; //设置图片1的的路径 ,就是src="image/1.jpg",路径一定要正确,否则显示不出来。
url1=new Image ();url1.src='#'; //设置图片1的链接网址,就是src="#",把#替换成你想要链接的网址.
img2=new Image ();img2.src='image/2.jpg'; //设置图片2的路径
url2=new Image ();url2.src='#'; //设置图片2链接的网址
img3=new Image ();img3.src='image/3.jpg'; //其它设置跟上面一样。
url3=new Image ();url3.src='#';
img4=new Image ();img4.src='image/4.jpg';
url4=new Image ();url4.src='#';
img5=new Image ();img5.src='image/5.gif';
url5=new Image ();url5.src='#';
//天极伊永恒原创 //googlephp.cn修改版。
var nn=1;
var key=0;
function change_img()
{if(key==0){key=1;}
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()',5000);} //设置变换图片的时间,单位毫秒,5000表示5秒换一次图片。
function changeimg(n){nn=n;window.clearInterval(tt);change_img();}
document.write('<style>');
document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;text-decoration:none;color:#fff;line-height:16px;font:12px sans-serif;background-color:#666;}');
document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;text-decoration:none;color:#fff;line-height:16px;font:12px 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" target="_blank"><img id="pic" style="border:0px;filter:progid:dximagetransform.microsoft.wipe(gradientsize=1.0,wipestyle=4, motion=forward)" width='+widths+' height='+heights+' /></a></div>');
document.write('<div style="filter:alpha(style=1,opacity=10,finishOpacity=80);background: #888888;width:100%-2px;text-align:right;top:-16px;position:relative;margin:1px;height:16px;padding:0px;margin:0px;border:0px;">');
for(var i=1;i<counts+1;i++){document.write('<a onmouseover="javascript:changeimg('+i+');" id="xxjdjj'+i+'" target="_self">'+i+'</a>');}
document.write('</div></div>');
change_img();
</SCRIPT>代码要设置的都有详细注释了,主要有这几个:图片的高度,图片的宽度,图片的个数,图片的路径,图片链接的网址,变换图片的时间。这里不对程序代码作详细的解释了。如果想了解的话,可以留言继续探讨。
« 上一篇:苦命的程序员,冏 php+mysql投票系统:下一篇 »
发表于 2012年02月5日 3:24 下午
After reading this for the fifth time I cannot tell you how great this content is. I am blown away by your knowledge and writing skills presented in this work. You did an amazing job!
[回复]
发表于 2012年02月5日 3:26 下午
I feel the need to thank you for sharing your vast knowledge. It isn't often I get to tell a writer "good job!". Thanks for all the great informative content.
[回复]
发表于 2012年02月5日 3:49 下午
Yours is a very unique informational article. Your fresh views persuaded me to be thoughtful about this subject. It's obvious you have provoked thought in other readers with your material.
[回复]
发表于 2012年02月5日 3:50 下午
The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it'll do even better in those areas, but for now it's a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod's strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.
[回复]
发表于 2012年02月5日 3:51 下午
I'm glad I discovered your article. Your writing is so thought-provoking. I'm sure I will think about this content for a while. Really good content.
[回复]
发表于 2012年02月5日 3:51 下午
Hiya! I know this is kinda off topic nevertheless I'd figured I'd ask. Would you be interested in exchanging links or maybe guest authoring a blog post or vice-versa? My blog discusses a lot of the same subjects as yours and I believe we could greatly benefit from each other. If you happen to be interested feel free to shoot me an email. I look forward to hearing from you! Excellent blog by the way!
[回复]
发表于 2012年02月5日 4:03 下午
I'm not quite sure where to begin with this, so I'll just say this is a really good article. I've enjoyed reading it and pondering the many points you make.
[回复]
发表于 2012年02月5日 4:09 下午
You are awesome! This article is a fine example of excellent informative writing. You have a wonderful gift for writing interesting informational content. Thank you.
[回复]
发表于 2012年02月5日 4:09 下午
Informative articles can make for long drawn out reading, but you have made yours interesting. This is very good informational content with many great points of interest. I like it. Keep up the great writing.
[回复]
发表于 2012年02月5日 4:14 下午
Thank you rather a great deal for providing such an excellent information in the world wide web. It's honestly good to find out that people today are nonetheless publishing this kind of beneficial information.
[回复]
发表于 2012年02月5日 4:42 下午
Oddly enough, the points made in this article are much like my thoughts on this subject. It's a little weird to see views much like my own in written content. I like this a lot.
[回复]
发表于 2012年02月5日 4:43 下午
Awesome post! I will keep an on eye on your blog.
[回复]
发表于 2012年02月5日 4:50 下午
I have a high standard I abide by for choosing reading material, especially online. Your article met my standards then flew right by them. You've written a great article with loads of great informational content.
[回复]
发表于 2012年02月5日 5:18 下午
Hello. magnificent job. I did not anticipate this. This is a excellent story. Thanks!
[回复]
发表于 2012年02月5日 5:52 下午
The subsequent time I learn a blog, I hope that it doesnt disappoint me as much as this one. I mean, I do know it was my option to learn, but I truly thought youd have one thing attention-grabbing to say. All I hear is a bunch of whining about something that you may repair in the event you werent too busy on the lookout for attention.
[回复]
发表于 2012年02月5日 5:59 下午
Informative articles can make for long drawn out reading, but you have made yours interesting. This is very good informational content with many great points of interest. I like it. Keep up the great writing. http://www.samsung1080phdtv.net/
[回复]
发表于 2012年02月5日 6:01 下午
Many times I have to figure out what the writers is trying to say in their articles. There's no doubt about your article. It's great!
[回复]
发表于 2012年02月5日 6:19 下午
Your article is wonderfully authored. I welcome this kind of content. The material here is formatted well and the points made are sound and original. Thanks for making this interesting.
[回复]
发表于 2012年02月5日 6:27 下午
Good blog here! following reading, i decide to buy a sleeping bag ASAP
[回复]
发表于 2012年02月5日 6:43 下午
I've never seen the use of descriptive terminology used in this fashion before. I have definitely learned much from the reading and the thought provoking ideas used in this article.
[回复]
发表于 2012年02月5日 7:01 下午
It appears that you have put a good amount of effort into your blog and this world require more of these on the Internet these days. The both of us actually enjoyed your post. I do not have a great deal to say in reply, I just wanted to sign up to reply well done.I always learn something new from your post!
[回复]
发表于 2012年02月5日 7:06 下午
Your article grabbed my interest in the very first sentence and never let go. You are creative, intelligent, persuasive and knowledgeable. You've mastered the fine art of writing. You've also given your readers useful information.
[回复]
发表于 2012年02月5日 7:18 下午
I normally consider this to be heavy-duty content, but you have made it so clear I understand it. The points you make are very logical.
[回复]
发表于 2012年02月5日 7:43 下午
This topic usually doesn't interest me, but you have managed to write this article in a unique manner. It's not boring and I read the whole thing without stopping once.
[回复]
发表于 2012年02月5日 7:47 下午
If this article hasn't been posted anywhere else, it should be. You have definitely learned much from the ideas you came up with to put into such a wonderful article.
[回复]
发表于 2012年02月5日 8:09 下午
I feel a little self-conscious writing a comment with all the other intelligent sounding comments here, but I feel I should. I believe you're right on many of your points in this article. Thank you.
[回复]
发表于 2012年02月5日 8:17 下午
[...] Wonderful story, reckoned we could combine a few unrelated data, nevertheless really worth taking a look, whoa did one learn about Mid East has got more problerms as well [...]……
[回复]
发表于 2012年02月5日 8:47 下午
How often I wind up reading dull and poorly written online commentary. This article was a refreshing change from all that. You make great points and present them in an interesting way. It's just smashing.
[回复]
发表于 2012年02月5日 8:47 下午
I know high quality work when I see it. Your content is of high quality and it's apparent you hold yourself to a higher standard than most. Keep writing like this and I'll be back.
[回复]
发表于 2012年02月5日 8:50 下午
Some people don't want to write on ideas like yours. Thank you for taking a subject of today and making it understandable for me to learn more about that I can use in everyday life.
[回复]
发表于 2012年02月5日 9:02 下午
I'm simply in awe of this article. How you were able to make this topic engaging is beyond my imagination. I am glad I got to read this. Thank you.
[回复]
发表于 2012年02月5日 9:02 下午
One thing I really like about informational articles is that they can influence a reader's thoughts. This article is one of those articles. I am highly impressed with your work and hope to read more.
[回复]
发表于 2012年02月5日 9:40 下午
Simply wish to say your article is as astounding. The clearness in your post is simply great and i could assume you're an expert on this subject. Fine with your permission let me to grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.
[回复]
发表于 2012年02月6日 2:44 上午
Somebody essentially help to make critically articles I'd state. That is the first time I frequented your web page and up to now? I amazed with the research you made to create this particular submit incredible. Great task!
[回复]
发表于 2012年02月6日 2:55 上午
Hiya, I'm really glad I have found this info. Nowadays bloggers publish only about gossips and web and this is really annoying. A good web site with exciting content, that's what I need. Thank you for keeping this web site, I'll be visiting it. Do you do newsletters? Can't find it.
[回复]
发表于 2012年02月6日 3:43 上午
Thank you for the very good writeup. It in fact was a amusement account it. Appear advanced to far added agreeable from you! Even so, how could we communicate?
[回复]
发表于 2012年02月6日 4:13 上午
One of the main companies along with developers associated with play controllers these days is definitely Sony. During the past, Sony afforded the world among the best play gaming systems in the market and also paved the best way to the creation of different play games consoles that supply outstanding top quality activity. The Sony Dsi was obviously a remarkable hit because it's bundled and among the top visuals in addition to audio technological know-how in their time. It provided quality enjoyment for anyone and this also engineering science likewise made how you can an additional gaming system that Sony produced as well as hardened this heights which is why various other game console producers imitate.
[回复]
发表于 2012年02月6日 4:46 上午
Can I just say what a relief to find someone who actually knows what theyre talking about on the internet. You definitely know how to bring an issue to light and make it important. More people need to read this and understand this side of the story. I cant believe youre not more popular because you definitely have the gift.
[回复]
发表于 2012年02月6日 4:58 上午
I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I'll go ahead and bookmark your website to come back in the future. Cheers
[回复]
发表于 2012年02月6日 5:08 上午
Thanks for the ideas you have contributed here. On top of that, I believe there are several factors that really keep your motor insurance premium all the way down. One is, to consider buying automobiles that are within the good list of car insurance companies. Cars which might be expensive are definitely more at risk of being robbed. Aside from that insurance is also in line with the value of your vehicle, so the more costly it is, then the higher the actual premium you only pay.
[回复]
发表于 2012年02月6日 5:21 上午
Something more important is that while looking for a good on the web electronics shop, look for web shops that are continuously updated, always keeping up-to-date with the most recent products, the most beneficial deals, plus helpful information on goods and services. This will make sure that you are dealing with a shop that stays over the competition and provides you what you ought to make knowledgeable, well-informed electronics purchases. Thanks for the essential tips I have learned through the blog.
[回复]
发表于 2012年02月6日 5:30 上午
AIR DOCTOR INC.
AIR CONDITIONING and HEATING REPAIR
8635 W SAHARA AVE PMB 429
Las Vegas, NV 89117(702) 407-5600
[回复]
发表于 2012年02月6日 5:36 上午
Thanks a lot for the helpful article. It is also my opinion that mesothelioma cancer has an really long latency time period, which means that signs and symptoms of the disease may well not emerge right until 30 to 50 years after the 1st exposure to asbestos. Pleural mesothelioma, which is the most common type and impacts the area throughout the lungs, may cause shortness of breath, chest pains, and also a persistent cough, which may cause coughing up maintain.
[回复]
发表于 2012年02月6日 5:54 上午
hey there and thank you for your info – I have certainly picked up something new from right here. I did however expertise several technical issues using this web site, as I experienced to reload the web site a lot of times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I'm complaining, but slow loading instances times will very frequently affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Well I’m adding this RSS to my email and can look out for a lot more of your respective intriguing content. Ensure that you update this again soon..
[回复]
发表于 2012年02月6日 6:05 上午
Simply wish to say your article is as astounding. The clarity to your submit is just great and that i could assume you're a professional in this subject. Fine together with your permission let me to take hold of your RSS feed to keep up to date with approaching post. Thank you 1,000,000 and please continue the rewarding work.
[回复]