java.text.html


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!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" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>网站首页</title>
<!-- TemplateEndEditable -->
<link href="./css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {
color: #000000;
text-decoration: none
}
-->
</style>
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

<body>

<jsp:include page="./top.jsp"></jsp:include>

<!-- TemplateBeginEditable name="EditRegion1" -->
<div class="Zhong">
<img src="./images/index.jpg" />
</div>
<!-- TemplateEndEditable -->

<div class="Xia">
<div class="ZUO">
<a href="#" onclick="return pre();"><img src="images/1.jpg"
border="0" /></a>
</div>
<div class="TUPIAN" id="TUPIAN">
<!-- 滚动示例 -->
<div id="demo" style="overflow:hidden;border: 1px dashed #CCC;width: 880px;">
<div id="indemo" style="float: left;width: 800%;">
<div id="demo1" style="float:left;">
<!-- 
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s1.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s2.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s3.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s4.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s5.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s6.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s4.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s5.jpg"
border="0" />
</a>
<a href="#"><img
src="http://www.codefans.net/jscss/demoimg/wall_s6.jpg"
border="0" />
</a>
-->
</div>
<div id="demo2" style="float:left;"></div>
</div>
</div>
<!--  -->


</div>
<div class="YOU">
<a href="#" onclick="return next();"><img src="images/2.jpg"
border="0" /></a>
</div>
</div>
<script type="text/javascript" src="<%=path%>/js/page.js"></script>
<script type="text/javascript">
var MyMar;
                var productcategory_id="";
       page_size=4;
       function findProductByShopcategoryAndProductcategory(){
    
       managerService.findProductByShopcategoryAndProductcategory("001",productcategory_id,cur_page,page_size,get_findProductByShopcategoryAndProductcategory);
       }
       function get_findProductByShopcategoryAndProductcategory(tt){
        
           var p_str=page(tt[0]);
           var t=tt[1];
           var str="";
      for(var i=0;i<t.length;i++){
     //  str+="<div class='shang-zhong'><div class='shang-zhongtu'><img src='./productimg/"+t[i][2]+"' width='187' height='111' /></div><div class='shang-zhongzi STYLE2'>"+t[i][1]+"</div></div>";
       str+="<span class='cptp'><a href='<%=path%>/to_product.action?product_id="+t[i][0]+"' target='_blank'><img src='./productimg/"+t[i][2]+"' width='208' height='120' border='0'/></a></span>"
       }
          document.getElementById('demo1').innerHTML=str;
         
          //开始滚动
var speed=10;
var tab=document.getElementById("demo");
var tab1=document.getElementById("demo1");
var tab2=document.getElementById("demo2");
tab2.innerHTML=tab1.innerHTML;
function Marquee(){
if(tab2.offsetWidth-tab.scrollLeft<=0)
tab.scrollLeft-=tab1.offsetWidth
else{
tab.scrollLeft++;
}
}
MyMar=setInterval(Marquee,speed);
tab.onmouseover=function() {clearInterval(MyMar)};
tab.onmouseout=function() {MyMar=setInterval(Marquee,speed)};
         
           //document.getElementById('page').innerHTML=p_str;
       }
      
       findProductByShopcategoryAndProductcategory();
  
    function go_page(to_page){
    cur_page=to_page;
    findProductByShopcategoryAndProductcategory();
            return false;
    }
     function pre(){
    cur_page--;
    if(cur_page<=0)
       cur_page=total_page;
        clearInterval(MyMar);          
    findProductByShopcategoryAndProductcategory();
            return false;
    }
    function next(){
    cur_page++;
    if(cur_page>total_page)
       cur_page=1; 
    clearInterval(MyMar);   
    findProductByShopcategoryAndProductcategory();
            return false;
    }
</script>

<jsp:include page="./end.jsp"></jsp:include>

</body>
</html>
<script>
<!--

-->
</script>

你可能感兴趣的:(java,html,XHTML,Go)