首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

换行展示及分页

2012-10-17 
换行显示及分页%@ page languagejava contentTypetext/html charsetUTF-8?? ?pageEncodingUTF-

换行显示及分页

<%@ page language="java" contentType="text/html; charset=UTF-8"

?? ?pageEncoding="UTF-8"%>

<%@page import="com.systop.core.dao.support.Page"%>

<html>

<%@include file="/common/meta.jsp" %>

<%@include file="/common/taglibs.jsp" %>

<head>

<title>网站首页</title>

<link href="${ctx}/ResRoot/css/public.css" rel="stylesheet" type="text/css" />

<link href="${ctx}/ResRoot/css/contribute_way.css" rel="stylesheet" type="text/css" />

<style type="text/css">

.goods{

float:left;?

width:170px;?

height:220px;?

margin:5px 5px;

}

.goods_img{

width:135px;?

height:145px;?

background-color:#F6F6F6;

border:1px solid #C0C0C0;

}

.goods_info{

margin-left:12px;

text-align: left;

}

img{

margin: auto auto;

}

.disEnable{

color: #C0C0C0;

}

</style>

</head>

<body>

<div style="width:970px;">

<div style="width:100%;margin-left:12px; border-bottom: 1px dotted #C0C0C0;">

?<s:iterator value="items" var="goods">

?<div cellspacing="0"><tr>

? ?<td align="center" valign="middle" target="_blank">

?<img src="${ctx}${goods.smallMainImgPath}" onload="javascript:if(this.height>this.width){this.height=140}else{this.width=130}"/></a>

? ?</td>

?</tr></table>

<div target="_blank">${goods.name}</a></div>

<div id="ec_p" name="ec_p" style="width:35px">

<input type="button" style="width:30px" value="GO" onclick="goPage()">

</div>

</div>

<script type="text/javascript">

function goPage(){

var pageNo = document.getElementById('ec_p').value;

var pNo = <%=p.getPages()%>;

if (!isNaN(pageNo)){

if(pNo < pageNo){

pageNo = pNo;

}

window.location.href = "goodsList.do?pageSize=<%=p.getPageSize()%>&ec_p=" + pageNo;

}else{

alert("请输入正确的数字!");

}

}

window.parent.scrollTo(0, 0);;

</script>

</body>

</html>

热点排行
Bad Request.