操纵脚本做的图片往复滑动[网站编程]
本文“操纵脚本做的图片往复滑动[网站编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
前台代码:
<div id="soutu">
<div id="zhuan">这里只是放一张图片罢了
<img alt="" src="../Images/a.jpg" width="750" height="330" />
</div>
</div>
<div id="tuzi">这里调用脚本函数
<a href="#" onmousemove="showLink(1)" class="aTaohang">1</a>
<a href="#" onmousemove="showLink(2)"class="aTaohang">2</a>
<a href="#" onmousemove="showLink(3)" class="aTaohang">3</a>
<a href="#" onmousemove="showLink(4)" class="aTaohang">4</a>
</div>
脚本:这里可我做成一个JS文件,放在前台调用,这样就便利点.
var time = window.setInterval("luen()", 5000);
function showLink(num) {
window.clearTimeout(time);
if (num == 1) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1342.jpg' width='750' height='330' /></div>"
}
if (num == 2) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1370.jpg' width='750' height='330'/></div>"
}
if (num == 3) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1452.jpg' width='750' height='330'/></div>"
}
if (num == 4) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1448.jpg' width='750' height='330'/></div>"
}
}
function out() {
time = window.setInterval("luen()", 5000);
}
var tmp = 0;
function luen() {
tmp++;
if (tmp == 1) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1342.jpg' width='750' height='330'/></div>"
}
else if (tmp == 2) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1370.jpg' width='750' height='330'/></div>"
}
else if (tmp == 3) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1452.jpg' width='750' height='330'/></div>"
}
else if (tmp == 4) {
document.getElementById("soutu").innerHTML = "<div id='zhuan' ><img src='../DataImages/1448.jpg' width='750' height='330'/></div>"
}
else {
tmp = 0;
}
}
function showbuy(divId) {
document.getElementById(divId).style.display = "block";
}
function disbuy(divId){
document.getElementById(divId).style.display = "none";
}
以上是“操纵脚本做的图片往复滑动[网站编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
- ·上一篇文章:JS程序中的美圆标记$解析
- ·下一篇文章:asp.net得到途径的办法
- ·中查找“操纵脚本做的图片往复滑动”更多相关内容
- ·中查找“操纵脚本做的图片往复滑动”更多相关内容