求js高手帮我写一个代码??鼠标划入停止、鼠标离开继续切换 100
先来100分,解决后再追加100分谢谢啦、、、、、求js高手帮我写一个鼠标划入停止、鼠标离开继续切换的代码!!我这个是一个焦点图、每四屏一次切换,代码如下:<divcla...
先来100分,解决后再追加100分 谢谢啦、、、、、
求js高手帮我写一个鼠标划入停止、鼠标离开继续切换的代码!!
我这个是一个焦点图、每四屏一次切换,
代码如下:
<div class="content">
<div class="rm_wrapper">
<div id="rm_container" class="rm_container">
<ul>
<li data-images="rm_container_1" data-rotation="-15"><img src="images/1.jpg" ></li>
<li data-images="rm_container_2" data-rotation="-5"><img src="images/2.jpg" ></li>
<li data-images="rm_container_3" data-rotation="5"><img src="images/3.jpg" ></li>
<li data-images="rm_container_4" data-rotation="15"><img src="images/4.jpg" ></li>
</ul>
<h2>Fashion Explosion 2012</h2>
<div style="display:none;">
<div id="rm_container_1"> <img src="images/1.jpg"><img src="images/5.jpg"> <img src="images/6.jpg"> <img src="images/7.jpg"> </div>
<div id="rm_container_2"> <img src="images/2.jpg"> <img src="images/8.jpg"> <img src="images/9.jpg"> <img src="images/10.jpg"> </div>
<div id="rm_container_3"> <img src="images/3.jpg"> <img src="images/11.jpg"> <img src="images/12.jpg"> <img src="images/13.jpg"> </div>
<div id="rm_container_4"> <img src="images/4.jpg"> <img src="images/14.jpg"> <img src="images/15.jpg"> <img src="images/16.jpg"> </div>
</div>
</div>
<div class="rm_nav"> <a id="rm_next" class="rm_next"></a> <a id="rm_prev" class="rm_prev"></a> </div>
</div>
</div> 展开
求js高手帮我写一个鼠标划入停止、鼠标离开继续切换的代码!!
我这个是一个焦点图、每四屏一次切换,
代码如下:
<div class="content">
<div class="rm_wrapper">
<div id="rm_container" class="rm_container">
<ul>
<li data-images="rm_container_1" data-rotation="-15"><img src="images/1.jpg" ></li>
<li data-images="rm_container_2" data-rotation="-5"><img src="images/2.jpg" ></li>
<li data-images="rm_container_3" data-rotation="5"><img src="images/3.jpg" ></li>
<li data-images="rm_container_4" data-rotation="15"><img src="images/4.jpg" ></li>
</ul>
<h2>Fashion Explosion 2012</h2>
<div style="display:none;">
<div id="rm_container_1"> <img src="images/1.jpg"><img src="images/5.jpg"> <img src="images/6.jpg"> <img src="images/7.jpg"> </div>
<div id="rm_container_2"> <img src="images/2.jpg"> <img src="images/8.jpg"> <img src="images/9.jpg"> <img src="images/10.jpg"> </div>
<div id="rm_container_3"> <img src="images/3.jpg"> <img src="images/11.jpg"> <img src="images/12.jpg"> <img src="images/13.jpg"> </div>
<div id="rm_container_4"> <img src="images/4.jpg"> <img src="images/14.jpg"> <img src="images/15.jpg"> <img src="images/16.jpg"> </div>
</div>
</div>
<div class="rm_nav"> <a id="rm_next" class="rm_next"></a> <a id="rm_prev" class="rm_prev"></a> </div>
</div>
</div> 展开
2012-11-29
展开全部
<div id="win" style="overflow:hidden; width:200px;">
<table border=1>
<tr>
<td id="win1">
<table >
<tr>
<td><img src="img/1.jpg">aaa</td>
<td><img src="img/2.jpg">sss</td>
<td><img src="img/6.jpg">xxx</td>
</tr>
</table>
</td>
<td id="win2" style="background:red;"></td>
</tr>
</table>
</div>
<script>
var win_part = document.getElementById('win');
var win_part1 = document.getElementById('win1');
var win_part2 = document.getElementById('win2');
var myclock;
myclock = setInterval("marquee()" ,10);
win_part2.innerHTML = win_part1.innerHTML;
win_part.onmouseover = function() {
clearInterval(myclock)
}
win_part.onmouseout=function() {
myclock = setInterval("marquee()" , 30);
}
function marquee(){
if(win_part2.offsetWidth <= win_part.scrollLeft) {
win_part.scrollLeft -= win_part1.offsetWidth;
} else {
win_part.scrollLeft++;
}
//win_part.scrollLeft++;
}
</script>
<table border=1>
<tr>
<td id="win1">
<table >
<tr>
<td><img src="img/1.jpg">aaa</td>
<td><img src="img/2.jpg">sss</td>
<td><img src="img/6.jpg">xxx</td>
</tr>
</table>
</td>
<td id="win2" style="background:red;"></td>
</tr>
</table>
</div>
<script>
var win_part = document.getElementById('win');
var win_part1 = document.getElementById('win1');
var win_part2 = document.getElementById('win2');
var myclock;
myclock = setInterval("marquee()" ,10);
win_part2.innerHTML = win_part1.innerHTML;
win_part.onmouseover = function() {
clearInterval(myclock)
}
win_part.onmouseout=function() {
myclock = setInterval("marquee()" , 30);
}
function marquee(){
if(win_part2.offsetWidth <= win_part.scrollLeft) {
win_part.scrollLeft -= win_part1.offsetWidth;
} else {
win_part.scrollLeft++;
}
//win_part.scrollLeft++;
}
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询