<!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=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
var picCount=2;
var index=0;
var padLeft=990;
function ChangePicPrev()
{
if(index!=-picCount)
{index=index-1;
}else{index=0;}
document.getElementById("scroll").style.pixelLeft=parseInt(padLeft)*parseInt(index);
}
function ChangePicNext()
{
if(index!=0){
index=index+1;
}
else{index=-(picCount);}
document.getElementById("scroll").style.pixelLeft=parseInt(padLeft)*parseInt(index);
}
</script>
<style type="text/css">
.txtBox{ float:left; width:990px;}
</style>
</head><body>
<div style="width:990px; height:490px; position:relative; margin:10px auto; overflow:hidden;
border-radius: 10px; box-shadow:#666 0px 2px 3px;behavior: url(../PIE.htc);">
<div id="scroll" style="position:absolute; width:2970px; height:490px;">
<div class="txtBox">
<img src="../Images/T1HVV.XgXzXXXXXXXX-990-490.jpg" />
</div>
<div class="txtBox">
<img src="../Images/T1etylXmFXXXXXXXXX-990-490.jpg" />
</div>
<div class="txtBox">
<img src="../Images/T1oGX.XeRvXXXXXXXX-990-490.jpg" />
</div>
</div>
<div style="z-index:99; position:absolute; left:-15px; top:205px; cursor:pointer;" onClick="javascript:ChangePicPrev();">
<img src="../Images/T1_DR9XixAXXXXXXXX-58-79.png" />
</div>
<div style="z-index:99; position:absolute; right:-15px; cursor:pointer; top:205px;" onClick="javascript:ChangePicNext();">
<img src="../Images/T16UWkXlJtXXXXXXXX-58-79.png">
</div>
</div>
</body>
</html>
==> document.getElementById("scroll").style.left=(parseInt(padLeft)*parseInt(index)) +"px";