滚动公告(用数据绑定显示的方法)

None.gif < script >
None.gif        
<!--
None.gif        
function  news_scroll(divid, height, arrStack)
None.gif{
None.gif    
this .ie  =  navigator.userAgent.indexOf('MSIE') >= 0 ;
None.gif    
this .div  =  document.all[divid]; 
None.gif    
this .to = this .j = 0 ; this .po = 1 ; this .mflag = false ;  
None.gif        
this .st1 = arrStack; 
None.gif        
this .rolling = (height % 2 ) ? 3 : 2 ;
None.gif    
this .up  =  height; 
None.gif    
this .height  =  height; 
None.gif    
this .down  =   0 - height;
None.gif
None.gif    
this .start  =  news_scroll_start;
None.gif    
this .go  =  news_scroll_go; 
None.gif    
this .gt  =  news_scroll_gt;     
None.gif    
this .chgdata  =  news_scroll_chgdata; 
None.gif    
this .chog  =  news_scroll_chog; 
None.gif    
return   this
None.gif}
None.gif
function  news_scroll_start(objName) { 
None.gif    
this .chgdata( 1 );  this .chog( 1 ,objName);
None.gif    
this .mflag  =   true ;
None.gif}
None.gif
function  news_scroll_go(o)
None.gif{
return   this .div.all['e' + o];}
None.gif
function  news_scroll_gt()
None.gif{
return   this .ie ? " pixelTop " : " top " ;}
None.gif
function  news_scroll_chgdata(o) 
None.gif
None.gif    
var  szhtml  =   ""
None.gif    
for ( var  idx = 0 ; idx <   this .st1.length; idx ++ )
None.gif        szhtml 
+=   " <div style='height: " + this .height + " '> " + this .st1[idx] + " </div> " ;  
None.gif    
for ( var  idx = 0 ; idx <   this .st1.length; idx ++ )
None.gif        szhtml 
+=   " <div style='height: " + this .height + " '> " + this .st1[idx] + " </div> " ;  
None.gif    
this .go(o).innerHTML  =  szhtml;     
None.gif}
None.gif
function  news_scroll_chog(o,objName)
None.gif{
None.gif    
if  ( this .st1.length == 0 return ;
None.gif        
if  ( this .mflag) 
None.gif              eval(
" this.go(o).style. " + this .gt() + " =parseInt(this.go(o).style. " + this .gt() + " )- " + this .rolling + " ; " ); 
None.gif        
if  (parseInt(eval( " this.go(o).style. " + this .gt()) % this .height)  ==   0
None.gif        {
None.gif        
if ( parseInt(eval( " this.go(o).style. " + this .gt()))  ==   this .height * this .st1.length *- 1
None.gif            eval(
" this.go(o).style. " + this .gt() + " =0; " );
None.gif        setTimeout(
" news_scroll_settimeout( " + o + " ,' " + objName + " ') " , 4000 );
None.gif        }    
None.gif    
else
None.gif        setTimeout(
" news_scroll_settimeout( " + o + " ,' " + objName + " ') " , 1 );
None.gif}
None.gif
function  news_scroll_settimeout(o,objName)
None.gif{ obj 
=  eval(objName); obj.chog(o,objName); }
None.gif
None.gif        
// -->
None.gif
         </ script >



None.gif < TABLE  id ="Table5"  cellSpacing ="0"  cellPadding ="0"  width ="100%"  border ="0" >
None.gif                                            
< TR >
None.gif                                                
< TD >< STRONG > 相关收藏: </ STRONG ></ TD >
None.gif                                                
< TD >
None.gif                                                    
< span  id ="Finance"  style ="BACKGROUND:none transparent scroll repeat 0% 0%;OVERFLOW:hidden;; WIDTH:expression(((document.body.offsetWidth*0.35)-100));CLIP:; WHITE-SPACE:nowrap;POSITION:relative;TOP:0px;HEIGHT:15px;TEXT-OVERFLOW:ellipsis"
None.gif                                                        onmouseover
="objFinance.mflag=false"  onmouseout ="objFinance.mflag=true" >< span  id ="e1"  style ="LEFT:0px;POSITION:absolute;TOP:0px;HEIGHT:15px" >
None.gif                                                        
</ span >< span  id ="e2"  style ="LEFT:0px;POSITION:absolute;TOP:15px;HEIGHT:15px" ></ span >
None.gif                                                    
</ span >
ExpandedBlockStart.gifContractedBlock.gif                                                    
< script  language ="javascript" > dot.gif
InBlock.gif        
var st1 = new Array (
InBlock.gif        
<asp:Repeater id="Repeater1" runat="server">
InBlock.gif                    
<ItemTemplate>
InBlock.gif                        '
<a href=<%"/FormMain.aspx?di_id=" & DataBinder.Eval(Container.DataItem,"di_id"& "&url=" & DataBinder.Eval(Container.DataItem,"url")%> class=ListTiltem target=_blank><%# DataBinder.Eval(Container.DataItem,"title")%></a></li>',
InBlock.gif                    
</ItemTemplate>
InBlock.gif        
</asp:Repeater>
InBlock.gif    
InBlock.gif        '
<a href="/default.aspx" target="_blank" >更多精彩网摘dot.gif</a>');    
InBlock.gif    
var objFinance = new news_scroll('Finance',15,st1);
InBlock.gif    objFinance.start('objFinance');
ExpandedBlockEnd.gif                                                    
</ script >
None.gif                                                    
< DIV ></ DIV >
None.gif                                                
</ TD >
None.gif                                            
</ TR >
None.gif                                        
</ TABLE >

转载于:https://www.cnblogs.com/T_98Dsky/archive/2005/04/26/145650.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值