<script type="text/javascript">
$(document).ready(function () {
clearInterval(0);
change(0);
runflash("#pic .Rlist_con");
runEnter("#enter .Rlist_con");
});
//新闻图片切换
var _c = _h = 0;
function runflash() {
$(‘#play >
a‘).click(function () {
var i = $(this).attr(‘title‘) - 1;
clearInterval(_h);
_c = i;
play();
change(i);
})
$("#pic .Rlist_con").hover(function () {
clearInterval(_h) }, function () { play() });
play();
}
function
play() {
_h = setInterval("auto()", 5000);
}
function change(i)
{
$(‘#play > a‘).css(‘background‘, ‘#000‘).eq(i).css(‘background‘,
‘#f60‘).blur();
$("#pic
.Rlist_con").hide().eq(i).fadeIn(‘slow‘);
}
function auto() {
_c =
_c == 2 ? 0 : _c + 1;
change(_c);
}
//企业图片切换
var _cc = _hh = 0;
function runEnter() {
$("#enter
.Rlist_con").hover(function () { clearInterval(_hh) }, function () { playEnter()
});
playEnter();
}
function playEnter() {
_hh =
setInterval("autoEnter()", 5000);
}
function changeEnter(i) {
$("#enter .Rlist_con").hide().eq(i).show();
}
function autoEnter()
{
_cc = _cc == 3 ? 0 : _cc + 1;
changeEnter(_cc);
}
</script>
新闻
<div id="pic" style="height: 346px; width: 455px;">
<div class="Rlist_con clearfix"
style="display:block;">
<div class="tit_img fL">
<a
href="http://www.gxind.com/InnovateNews/2013/201312270.html" target="_blank"
title="食品行业新危机应对与创新营销高峰论坛在广州举行"><img src="/PicNewsImage/2014311101543.jpg"
alt="食品行业新危机应对与创新营销高峰论坛在广州举行" height="346px" width="455px"
title="食品行业新危机应对与创新营销高峰论坛在广州举行"
/></a>
</div>
</div>
<div class="Rlist_con
clearfix" style="display:block;">
<div class="tit_img fL">
<a
href="13412" target="_blank" title="测试食品"><img
src="/PicNewsImage/201431294837.jpg" alt="测试食品" height="346px" width="455px"
title="测试食品" /></a>
</div>
</div>
<div
class="Rlist_con clearfix" style="display:block;">
<div class="tit_img
fL">
<a href="http://www.gxind.com/InnovateNews/2013/201312247.html"
target="_blank" title="九阳:从创新到创造的健康食尚家"><img
src="/PicNewsImage/201422814841.jpg" alt="九阳:从创新到创造的健康食尚家" height="346px"
width="455px" title="九阳:从创新到创造的健康食尚家"
/></a>
</div>
</div>
</div>
企业
<div id="enter" class="dq_gg_mid2 clearfix">
<div id="dvEnter_1" name="dvEnter" class="Rlist_con"
style="display:block">
<div class="dq_img_l"><a
href="/company/128/companyinfo.htm" target="_blank" title="测试后台新增">
<img src="/Company/Logo/20140304113705766.jpg" alt="测试后台新增" width="300" height="200" /></a></div>
<div class="dq_img_l"><a href="/company/100/companyinfo.htm" target="_blank" title="广西永凯糖纸集团有限责任公司">
<img src="/Company/Logo/2013923162344.jpg" alt="广西永凯糖纸集团有限责任公司" width="300" height="200" /></a></div>
<div class="dq_img_l"><a
href="/company/98/companyinfo.htm" target="_blank" title="横县南方茶厂">
<img src="/Company/Logo/201391315529.jpg" alt="横县南方茶厂"
width="300" height="200" /></a></div>
</div>
<div id="dvEnter_2" name="dvEnter" class="Rlist_con"
style="display:none">
<div class="dq_img_l"><a
href="/company/96/companyinfo.htm" target="_blank"
title="百洋水产集团股份有限公司"><img src="/Company/Logo/2013913104545.jpg"
alt="百洋水产集团股份有限公司" width="300" height="200"
/></a></div>
<div class="dq_img_l"><a
href="/company/93/companyinfo.htm" target="_blank"
title="广西石埠乳业有限责任公司"><img src="/Company/Logo/20139131127.jpg"
alt="广西石埠乳业有限责任公司" width="300" height="200"
/></a></div>
<div class="dq_img_l"><a
href="/company/91/companyinfo.htm" target="_blank"
title="广西恩度高科技股份有限公司"><img src="/Company/Logo/201391311952.jpg"
alt="广西恩度高科技股份有限公司" width="300" height="200" /></a></div>
</div>
</div>
<div class="dq_main_01 clearfix mt20">
<div
class="dq_gg_top">
<div class="dq_gg_zy1">
<span class="blue">创新</span>产品</div>
<div class="main_r_more2">
<a
href="/Channel/ChanProductList.aspx?ChannelCode=shihua"
target="_blank">更多内容</a></div>
</div>
<div class="dq_gg_mid clearfix">
<div id="scroll_div"
class="scroll_div">
<div id="indemo">
<div
id="scroll_begin">
<table>
<tr><td><a
href="/company/46/product/companyproductInfo43.htm" title="新型液化石油气钢瓶"
target="_blank"><img src="/company/46/productimg/2013/2013829163017.bmp"
alt="新型液化石油气钢瓶"></a></td></tr><tr><td><a
href="/company/46/product/companyproductInfo43.htm" title="新型液化石油气钢瓶"
target="_blank">新型液化石油气..</a></td></tr><tr><td><a
href="/company/46/companyinfo.htm" class="gray" target="_blank"
title="东兴神骏燃气具有限公司">东兴神骏燃气具...</a></td></tr></tbody></table><table>
<tbody>
<tr><td><a
href="/company/44/product/companyproductInfo41.htm" title="50%丙环唑—左旋松油醇乳油"
target="_blank"><img src="/company/44/productimg/2013/2013829162511.bmp"
alt="50%丙环唑—左旋松油醇乳油"></a></td></tr><tr><td><a
href="/company/44/product/companyproductInfo41.htm" title="50%丙环唑—左旋松油醇乳油"
target="_blank">50%丙环唑—左旋..</a></td></tr><tr><td><a
href="/company/44/companyinfo.htm" class="gray" target="_blank"
title="广西壮族自治区化工研究院">广西壮族自治区...</a></td></tr></tbody></table>
</div>
<div id="scroll_end">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function ScrollimgLeft()
{
var speed = 15
var scroll_begin =
document.getElementById("scroll_begin");
var scroll_end =
document.getElementById("scroll_end");
var scroll_div =
document.getElementById("scroll_div");
scroll_end.innerHTML =
scroll_begin.innerHTML;
function Marquee() {
if
(scroll_end.offsetWidth - scroll_div.scrollLeft <= 0)
scroll_div.scrollLeft -= scroll_begin.offsetWidth;
else
scroll_div.scrollLeft++;
}
var MyMar =
setInterval(Marquee, speed)
scroll_div.onmouseover = function () {
clearInterval(MyMar); }
scroll_div.onmouseout = function () { MyMar =
setInterval(Marquee, speed); }
}
ScrollimgLeft();
</script>
原文:http://www.cnblogs.com/21xz/p/3595906.html