这段代码错在哪里了,为什么实现不了滚动呢,求大神指点
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
#right{
float:left;
width:350px;
height:450px;
margin-left:35px;
font-size:16px;
vertical-align:middle;
color:#ccc;
overflow:hidden;
}
#right #rt h2{
color:#FF868B;
border-bottom:3px solid #FF868B;
}
#right #rt h2 span a{
color:#FF868B;
font-size:18px;
line-height:30px;
margin-left:120px;
font-weight:normal;
}
#right #rpic{
margin-top:10px;
overflow:hidden;
font-size:16px;
}
#right #rpic ul{
list-style:none;
}
#right #rpic ul li{
display:block;
border-bottom:1px dashed #ccc;
}
#right #rpic ul li a{
font-size:14px;
color:#999;
}
#right #rpic img{
vertical-align:middle;
padding:5px;
}
#right #rpic .cp{
height:20px;
line-height:20px;
display:block;
}
</style>
</head>
<body>
<div id="right">
<div id="rt"><h2>人气单品推荐<span><a href="#">更多>></a></span></h2></div>
<div id="rpic">
<ul id="con1">
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
<li>
<a href="#"><img src="image/10.jpg"/></a>
<span><a href="#">秋装女装2016新版套装气质连衣裙</a></span>
</li>
</ul>
<ul id="con2"></ul>
</div>
</div>
<script type="text/javascript">
var pic=document.getElementById("rpic");
var con1=document.getElementById("con1");
var con2=document.getElementById("con2");
pic.scrollTop=0;
var time=50;
con2.innerHTML=con1.innerHTML;
function scrollUp(){
if(pic.scrollTop >= con1.scrollHeight){
pic.scrollTop = 0;
}else{
pic.scrollTop ++;
}
}
var myscroll= setInterval("scrollUp()",time);
pic.onmouseover=function(){
clearInterval(myscroll);
}
pic.onmouseout=function(){
myscroll= setInterval("scrollUp()",time);
}
</script>
</body>
</html>