|
作者: pyion [pyion] 论坛用户 | 登录 |
请各位高手帮一下:news.zhongsou.com这个网页下面的个性按钮是怎么做成的...急需要啊..有这方面的资料或技术请告诉我..谢谢....QQ:33145948 |
地主 发表时间: 05-10-26 06:55 |
回复: zmdxl [zmdxl] 论坛用户 | 登录 |
是不是这两个图片: 如何实现的,请看这个: <a href="javascript:ChangeIframe(3)"><img name="pd_image3" id=pd_image3 src="http://image.zhongsou.com/new_news/background/close_a.gif" width="55" height="33" border="0"></a> 下面是用JavaScript编写的ChangeIframe() function ChangeIframe(id) { var var_url=""; var var_height=1; switch(id) { case 1: var_url="finance/Ffin.htm";var_height=473;break; case 2: var_url="car/Fcar.htm";var_height=565;break; case 3: var_url="sport/Fsport.htm";var_height=440;break; case 4: var_url="it/Fit.htm";var_height=475;break; case 5: var_url="home/Fhome.htm";var_height=485;break; case 6: var_url="ent/Fent.htm";var_height=593;break; case 7: var_url="games/Fgame.htm";var_height=550;break; case 8: var_url="women/Fwomen.htm";var_height=575;break; case 9: var_url="health/Fhealth.htm";var_height=460;break; default: break; } var ssmp = parseInt(id)+10;var smp = "iframe"+ssmp;var zmp="pd_image"+id; if(zsnews.substring(11+id,12+id) == 0) { document.getElementById(zmp).src="http://image.zhongsou.com/new_news/background/close_a.gif"; zsnews = zsnews.substring(0,id+11)+"1"+zsnews.substring(id+12,21); document.getElementById(smp).src =var_url; document.getElementById(smp).height=var_height; } else { document.getElementById(zmp).src="http://image.zhongsou.com/new_news/background/open_a.gif"; zsnews = zsnews.substring(0,11+id)+"0"+zsnews.substring(12+id,21); document.getElementById(smp).src ="main/blank.htm"; document.getElementById(smp).height=1; } SetCookie(zsnews); } 上面的可能不全面,你看下它网页源文件里的JavaScript代码,应该明白了~ [此贴被 zmdxl(zmdxl) 在 10月27日23时08分 编辑过] |
B1层 发表时间: 05-10-27 23:01 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号