<table id="sItem" style="width: 230px;height: 140px; margin-right: auto; margin-left: auto;">
<asp:Repeater ID="JxtdRepeater2" runat="server">
<ItemTemplate>
<tr style="height: 125px">
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 100px" align="center" ><img src=<%# Eval("Item3")%> height="120" width="84" /></td>
<td style="line-height: 150%" ></td>
</tr>
</table>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
从数据库取得的数据,在同一个地方循环显示。
解决方案 »
- select 多选
- Ext3.1.1版本下关于tabpanel的submit问题
- 求救!在线等!各位高手,如何根据数值的正负设置颜色
- 目前最常用的jQuery版本??
- 哭求各位JS高手,小第一个问题想问!
- document.createElement方法生成的Div如何添加事件?
- 关于javascript数组长度的问题。
- 页面中有两个iframe,为什么用window.frames.frameid方法得不到iframe
- TradingView Demo 不知道如何弄,大神在哪里
- 这段代码里面为什么会报错
- location.href不跳转是怎么回事
- caChecker1.0.2已发布,表单验证从此变得很简单!
数据库数据打印到table里?这个应该是asp做的事情。
还是页面上的table里已经有若干数据,需要用jquery循环,把每个td里的读取出来?
一个jQuery插件,很好用的。
<td colspan="2">
<div id="marquee5">
<ul> <asp:Repeater ID="JxtdRepeater2" runat="server">
<ItemTemplate>
<li>
<table cellpadding="0" cellspacing="0" style="width: 220px">
<tr>
<td style="width: 100px" align="center" ><img src=<%# Eval("Item3")%> height="120" width="84" /></td>
<td style="width: 120px;line-height: 150%">姓名:<%# Eval("Item2")%><br><%# Eval("Item4").ToString.Replace(vbCrLf, "<br>")%></td>
</tr>
</table>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div> </td>
</tr>并控制样式 #marquee5 {width:220px;height:125px; overflow:hidden;}
#marquee5 ul
{
padding: 0px;
float: left;
list-style: none;
width: 220px;
margin: 0px;
}
#marquee5 ul li
{
margin: 0px;
float: left;
width: 220px;
height: 125px;
padding: 0px;
text-align: left;
display: inline;
}使用
<script src="Scripts/kxbdSuperMarquee.js" type="text/javascript"></script>
$(function () { //一次滚动一屏
$('#marquee5').kxbdSuperMarquee({
isEqual: false,
distance: 125,
time: 4,
//btnGo:{up:'#goU',down:'#goD'},
direction: 'up'
});});解决。
<li>第一条消息</li>
<li>第二条消息</li>
<li>第三条消息</li>
</ul>$(document).ready(function(){
$(“#twitter li:not(:first)”).css(“display”,”none”);
var B=$(“#twitter li:last”);
var C=$(“#twitter li:first”);
setInterval(function(){
if(B.is(“:visible”)){
C.fadeIn(500).addClass(“in”);B.hide()
}else{
$(“#twitter li:visible”).addClass(“in”);
$(“#twitter li.in”).next().fadeIn(500);
$(“li.in”).hide().removeClass(“in”)}
},3000) //每3秒钟切换一条,你可以根据需要更改
})
<script type="text/javascript" src="jq.js"></script>
<script type="text/javascript">
$(function () {
var trs = $('#sItem > tbody > tr'), idx = 0;
trs.filter(':gt(' + idx + ')').hide(); //隐藏其他行
function animate() {
idx++;
if (idx >= trs.length) idx = 0;
trs.hide().eq(idx).fadeIn(300);
}
setInterval(animate, 3000);
});
</script>
<table id="sItem" style="width: 230px;height: 140px; margin-right: auto; margin-left: auto;">
<tr style="height: 125px">
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 100px" align="center" ><img src="map.gif" height="120" width="84" /></td>
<td style="line-height: 150%" ></td>
</tr>
</table>
</td>
</tr>
<tr style="height: 125px">
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 100px" align="center" ><img src="adsl.jpg" height="120" width="84" /></td>
<td style="line-height: 150%" ></td>
</tr>
</table>
</td>
</tr>
<tr style="height: 125px">
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 100px" align="center" ><img src="map.gif" height="120" width="84" /></td>
<td style="line-height: 150%" ></td>
</tr>
</table>
</td>
</tr><tr style="height: 125px">
<td colspan="2">
<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td style="width: 100px" align="center" ><img src="adsl.jpg" height="120" width="84" /></td>
<td style="line-height: 150%" ></td>
</tr>
</table>
</td>
</tr>
</table>