一个图片展示的源码 今天看到太平洋汽车网上一个图片展示效果,我对javascript不是很懂,请问有无达人有此源码的?以下为源代码http://piclib.pcauto.com.cn/cars/image/s8386-162719-1.html 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.efectorelativo.net/laboratory/noobSlide/,看看这个对你是否有帮助,可以下载源码的 懒人图库的js广告代码有很多啊例如http://www.lanrentuku.com/lanren/jscode/js-0100/这个是总页http://www.lanrentuku.com/lanren/jscode/jscode_7.shtml中的一个,楼主可以找找看 其实和这个的效果差不多,改一下就可以了!<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title> </title><script>var cur = 1;function show(n){cur = n;var index1 = n-1;var index2 = n+1;if(index1 <0){index1 = 5;}if(index2>5){index2 = 0;}var str = ' <img src="http://www.csf.org.cn/test/images/spic0'+index1+'.jpg" alt="img" width="120" height="90" />';str += ' <img src="http://www.csf.org.cn/test/images/spic0'+n+'.jpg" alt="img" width="360" height="270" hspace="40" align="absmiddle" />';str += ' <img src="http://www.csf.org.cn/test/images/spic0'+index2+'.jpg" alt="img" width="120" height="90" />';document.getElementById("sss").innerHTML = str;}function prev(){cur--;if(cur <0){cur = 5;}show(cur);}function next(){cur++;if(cur>5){cur = 0;}show(cur);}</script></head><body><table width="850" border="0" align="center" cellpadding="5" cellspacing="0" style="border:#CCCCCC 1px solid;"> <tr> <td width="40" align="center" onClick="prev()"> <img src="http://www.csf.org.cn/test/images/l.gif" alt="fw" width="17" height="17" /> </td> <td align="center" valign="middle"> <span id="sss"> </span> </td> <td width="40" align="center" onClick="next()"> <img src="http://www.csf.org.cn/test/images/r.gif" alt="fw" width="17" height="17" /> </td> </tr></table><br /><hr size="1" /><br /><table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="133" align="center" onClick="show(0)"> <img src="http://www.csf.org.cn/test/images/spic00.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> <td width="133" align="center" onClick="show(1)"> <img src="http://www.csf.org.cn/test/images/spic01.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> <td width="133" align="center" onClick="show(2)"> <img src="http://www.csf.org.cn/test/images/spic02.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> <td width="133" align="center" onClick="show(3)"> <img src="http://www.csf.org.cn/test/images/spic03.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> <td width="133" align="center" onClick="show(4)"> <img src="http://www.csf.org.cn/test/images/spic04.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> <td width="135" align="center" onClick="show(5)"> <img src="http://www.csf.org.cn/test/images/spic05.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td> </tr></table><br /><br /><table width="300" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="70" onClick="prev()"> <img src="http://www.csf.org.cn/test/images/l.gif" alt="fw" width="17" height="17" align="absmiddle" />上一页 </td> <td width="20" onClick="show(0)">1 </td> <td width="20" onClick="show(1)">2 </td> <td width="20" onClick="show(2)">3 </td> <td width="20" onClick="show(3)">4 </td> <td width="20" onClick="show(4)">5 </td> <td width="20" onClick="show(5)">6 </td> <td width="70" onClick="next()"> <img src="http://www.csf.org.cn/test/images/r.gif" alt="fw" width="17" height="17" align="absmiddle" />下一页 </td> </tr></table><br /></body></html><script>show(1);</script> 对AJAX有兴趣的朋友,欢迎加入群78514534对ASP.NET和C#有兴趣的朋友,欢迎加入67226009 radio的值在IE能正常显示,firefox则不正常 JAVASCRITP 获取radio的值?? ie里如何实现同时打开二个窗口 请问这个功能能否实现? 求一段代码,关于提交表单 验证是否为空,是否符合要求的代码 一个javascript赋值问题 alert返回false的BC问题!弹出alert而不刷新页面 子窗口与父窗口之间的传值!!!急!! 日期时间问题,高分求解 这种效果用javascript怎么实现? JQUERY中的scrollTop() 和scrollleft到底是什么意思啊 ext panel居中
这个是总页http://www.lanrentuku.com/lanren/jscode/jscode_7.shtml中的一个,楼主可以找找看
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title> </title>
<script>
var cur = 1;
function show(n){
cur = n;
var index1 = n-1;
var index2 = n+1;
if(index1 <0){
index1 = 5;
}
if(index2>5){
index2 = 0;
}
var str = ' <img src="http://www.csf.org.cn/test/images/spic0'+index1+'.jpg" alt="img" width="120" height="90" />';
str += ' <img src="http://www.csf.org.cn/test/images/spic0'+n+'.jpg" alt="img" width="360" height="270" hspace="40" align="absmiddle" />';
str += ' <img src="http://www.csf.org.cn/test/images/spic0'+index2+'.jpg" alt="img" width="120" height="90" />';
document.getElementById("sss").innerHTML = str;
}
function prev(){
cur--;
if(cur <0){
cur = 5;
}
show(cur);
}
function next(){
cur++;
if(cur>5){
cur = 0;
}
show(cur);
}
</script>
</head>
<body>
<table width="850" border="0" align="center" cellpadding="5" cellspacing="0" style="border:#CCCCCC 1px solid;">
<tr>
<td width="40" align="center" onClick="prev()"> <img src="http://www.csf.org.cn/test/images/l.gif" alt="fw" width="17" height="17" /> </td>
<td align="center" valign="middle">
<span id="sss"> </span> </td>
<td width="40" align="center" onClick="next()"> <img src="http://www.csf.org.cn/test/images/r.gif" alt="fw" width="17" height="17" /> </td>
</tr>
</table>
<br />
<hr size="1" />
<br />
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="133" align="center" onClick="show(0)"> <img src="http://www.csf.org.cn/test/images/spic00.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
<td width="133" align="center" onClick="show(1)"> <img src="http://www.csf.org.cn/test/images/spic01.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
<td width="133" align="center" onClick="show(2)"> <img src="http://www.csf.org.cn/test/images/spic02.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
<td width="133" align="center" onClick="show(3)"> <img src="http://www.csf.org.cn/test/images/spic03.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
<td width="133" align="center" onClick="show(4)"> <img src="http://www.csf.org.cn/test/images/spic04.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
<td width="135" align="center" onClick="show(5)"> <img src="http://www.csf.org.cn/test/images/spic05.jpg" alt="img" width="120" height="90" style="border:#EBEBEB solid 1px;" /> </td>
</tr>
</table>
<br />
<br />
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="70" onClick="prev()"> <img src="http://www.csf.org.cn/test/images/l.gif" alt="fw" width="17" height="17" align="absmiddle" />上一页 </td>
<td width="20" onClick="show(0)">1 </td>
<td width="20" onClick="show(1)">2 </td>
<td width="20" onClick="show(2)">3 </td>
<td width="20" onClick="show(3)">4 </td>
<td width="20" onClick="show(4)">5 </td>
<td width="20" onClick="show(5)">6 </td>
<td width="70" onClick="next()"> <img src="http://www.csf.org.cn/test/images/r.gif" alt="fw" width="17" height="17" align="absmiddle" />下一页 </td>
</tr>
</table>
<br />
</body>
</html>
<script>
show(1);
</script>
对ASP.NET和C#有兴趣的朋友,欢迎加入67226009