
如图,从数据库读出的若干图片,页面显示5个,点左右两边的"小三角",图片会向左或向右移动,同时没有显示的图片也跟着向左或向右移动.直到5个图片全部消失(也就是新的5个图片出现,占居了如图的相应位置)就停止移动.
asp.net.
做了一个分页,每页显示5个,"小三角"相当"上一页""下一页",显然这个想法不行,因为每次都有刷新页面.
特请教大家,这是我做的:
前台代码:
<
div
id
="Layer1"
align
="center"
>
<
table
cellSpacing
="0"
cellPadding
="0"
width
="80%"
align
="center"
border
="0"
>
<
tr
>
<
td
width
="5%"
><
IMG
onmousemove
="ToLeft();"
onmouseout
="C1.stop();"
src
="../image/arrow_yf.gif"
></
td
>
<
td
width
="90%"
>
<
div
align
=center
>
<
marquee
id
="C1"
scrollAmount
="10"
behavior
="scroll"
width
="500"
height
="40"
><
asp:table
id
="tblImg"
runat
="server"
CellSpacing
=10
></
asp:table
></
marquee
>
</
div
>
</
td
>
td width="5%">
<
IMG
onmousemove
="ToRight();"
onmouseout
="C1.stop();"
src
="../image/arrow_y.gif"
></
td
>
</
tr
>
</
table
>
</
div
>
后台代码:
就是定义一个TableRow,和TableCell,有多少个图片就有多少个TableCell,每个TableCell放IMG图片.然后把所有TableCell添加到这个TableRow.最后tblImg.Rows.Add(row);
显然,只实现了:鼠标放在"小三角"上就向左向右移动的动能.而
只移动5个然后停止的功能没有实现!!!!!!
特请教,马上就要交付给客户了,心里有点急...