动态图片轮流播而且点击图片时连接到一个新闻地址
2006-04-14 14:03
411 查看
<DIV id="icefable2" align="center"><asp:datalist id="DataListPic" runat="server" Width="772px" ShowHeader="False" Height="125px"
RepeatDirection="Horizontal" ShowFooter="False">
<SelectedItemTemplate>
<FONT face="宋体"></FONT>
</SelectedItemTemplate>
<ItemTemplate>
<TABLE id="Table17" height="110" cellSpacing="0" cellPadding="0" width="133" border="0">
<TR>
<TD width="160"><FONT face="宋体">
<asp:ImageButton id=ImageButton1 onclick=OnPicList_Click runat="server" Width="133px" ImageUrl='<%# ((DataRowView)Container.DataItem)["pic"]%>' Height="100px" CommandArgument='<%# ((DataRowView)Container.DataItem)["id"]%>' AlternateText='<%# ((DataRowView)Container.DataItem)["title"]%>'>
</asp:ImageButton></FONT></TD>
<TD width="10"><FONT face="宋体"></FONT></TD>
</TR>
<TR>
<TD>
<asp:HyperLink id=messageLink Runat="server" NavigateUrl='<%# "Article.aspx?id="+((DataRowView)Container.DataItem)["id"]%>' title='<%# ((DataRowView)Container.DataItem)["title"]%>' text='<%# mySubString(((DataRowView)Container.DataItem)["title"].ToString(),8)%>'>
</asp:HyperLink></TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:datalist></DIV>
<SCRIPT language="javascript">
<!--
marqueesHeight=760;
stopscroll=false;
with(icefable2){
style.width=marqueesHeight;
style.height=110;
style.overflowX='hidden';
style.overflowY='visible';
noWrap=true;
onmouseover=new Function('stopscroll=true');
onmouseout=new Function('stopscroll=false');
}
preTop=0; currentLeft=100; stoptime=0;
function init_srolltext(){
icefable2.scrollLeft=0;
setInterval('scrollUp()',40);//滚动速度
}init_srolltext();
function scrollUp(){
if(stopscroll==true) return;
currentLeft+=1;
if(currentLeft==91) //滚动距离
{
stoptime+=1;
currentLeft-=1;
if(stoptime==91) //滚动间距
{
currentLeft=0;
stoptime=0;
}
}
else {
preTop=icefable2.scrollLeft;
icefable2.scrollLeft+=1;
if(preTop==icefable2.scrollLeft){
icefable2.scrollLeft=0;
icefable2.scrollLeft+=1;
}
}
}
-->
</SCRIPT>
div 里面放的是个datagrid控件,在控件里面帮定图片数据
用javascrip是图片滚动播放,不知道里需要的是不是这个意思
RepeatDirection="Horizontal" ShowFooter="False">
<SelectedItemTemplate>
<FONT face="宋体"></FONT>
</SelectedItemTemplate>
<ItemTemplate>
<TABLE id="Table17" height="110" cellSpacing="0" cellPadding="0" width="133" border="0">
<TR>
<TD width="160"><FONT face="宋体">
<asp:ImageButton id=ImageButton1 onclick=OnPicList_Click runat="server" Width="133px" ImageUrl='<%# ((DataRowView)Container.DataItem)["pic"]%>' Height="100px" CommandArgument='<%# ((DataRowView)Container.DataItem)["id"]%>' AlternateText='<%# ((DataRowView)Container.DataItem)["title"]%>'>
</asp:ImageButton></FONT></TD>
<TD width="10"><FONT face="宋体"></FONT></TD>
</TR>
<TR>
<TD>
<asp:HyperLink id=messageLink Runat="server" NavigateUrl='<%# "Article.aspx?id="+((DataRowView)Container.DataItem)["id"]%>' title='<%# ((DataRowView)Container.DataItem)["title"]%>' text='<%# mySubString(((DataRowView)Container.DataItem)["title"].ToString(),8)%>'>
</asp:HyperLink></TD>
</TR>
</TABLE>
</ItemTemplate>
</asp:datalist></DIV>
<SCRIPT language="javascript">
<!--
marqueesHeight=760;
stopscroll=false;
with(icefable2){
style.width=marqueesHeight;
style.height=110;
style.overflowX='hidden';
style.overflowY='visible';
noWrap=true;
onmouseover=new Function('stopscroll=true');
onmouseout=new Function('stopscroll=false');
}
preTop=0; currentLeft=100; stoptime=0;
function init_srolltext(){
icefable2.scrollLeft=0;
setInterval('scrollUp()',40);//滚动速度
}init_srolltext();
function scrollUp(){
if(stopscroll==true) return;
currentLeft+=1;
if(currentLeft==91) //滚动距离
{
stoptime+=1;
currentLeft-=1;
if(stoptime==91) //滚动间距
{
currentLeft=0;
stoptime=0;
}
}
else {
preTop=icefable2.scrollLeft;
icefable2.scrollLeft+=1;
if(preTop==icefable2.scrollLeft){
icefable2.scrollLeft=0;
icefable2.scrollLeft+=1;
}
}
}
-->
</SCRIPT>
div 里面放的是个datagrid控件,在控件里面帮定图片数据
用javascrip是图片滚动播放,不知道里需要的是不是这个意思
相关文章推荐
- Android中一个新闻项目中点击新闻,webview加载不出来,总报连接超时
- MVC3.0 如何点击点击一张图片连接到另一地址
- listview练习,当连接类型为文本时图片地址的文本框隐藏,textbox渲染到客户端的ID不是服务端所写的clientID,只能另外添加一个属性myid
- 点击一个按钮,动态加载不同的图片
- GridView的最后固定显示一个增加图片,点击图片动态增加内容item
- img的src不连接本地地址实现输出一个图片(使用base64)
- GridView的最后固定显示一个增加图片,点击图片动态增加内容item
- JQuery中点击超链接动态修改url连接地址无效
- 点击按钮“编辑” 动态添加一个input text
- $_SESSION['HTTP_REFERER'] 获取当前页面上一个连接的来源地址
- 点击新闻条目跳转viewpager+photoview显示图片
- 【阅读】《Head First jQuery》第二章——选择器与方法(一个点击图片页面显示文字的小例子)
- 因为老板让我做一个WAP 游戏!所以百分求!WAP版的斗地主游戏 地址!我玩一玩参考一下!希望有玩过的给我一个连接!谢谢
- 分布式文件系统发展史(动态图片,点击就能看到动态模拟)
- VB 如何给控件赋一个具有超连接的值(点击控件,连接指定网页页面)
- 在网页中动态的生成一个图片
- 得到连接和图片的地址 正则
- 图片新闻的动态切换
- 总结【代码重构】:Backbone.js做一个点击链接,跳过加载图片后即可跳转到效果图片的例子
- docker下的swagger-ui动态一个地址展示多个文档