2010-05-22 57 views
0

不使用選取框標記我想顯示如下代碼的消息。我想使用JavaScript而不是選取框標記。如何使用JavaScript來做到這一點?如何顯示沒有選取標記的消息

<marquee style="width: 292px; border-bottom: 1px solid rgb(221, 221, 221);" align="top" behavior="scroll" direction="up" onmouseout="this.start();" onmouseover="this.stop();" scrollamount="1" scrolldelay="25" truespeed="" id="mSpeed" bgcolor="#f1f2ec" height="500"> 


        <div style="padding: 5px; height: 153px;" class="workshopDesc bottomHorzLine "> 
         <div class="workshopTitle" align="left">Financial Management Training</div> 

         <div class="workshopDate"><font color="#ff0000" size="1"><strong>Date: Friday, May 28, 2010</strong></font></div> 
         <div class="workshopRPName"><strong>Resource Person: Saif Rahman<br>Independent Consultant in Business Case Development and Financial Management</strong></div> 

         <div class="workshopDesc">Mr. Saif Rahman is an Independent Consultant in Business Case Development and Financial Management with rich experience of corporate sectors of both North America and South-East Asia.... 
         <div style="float: right; width: 150px;" align="right"><img src="images/icons_more.gif" align="absmiddle" width="12" height="12" hspace="5"><a href="http://BdjobsTraining.com/workshop_formate.asp?TID=518" class="workshopLink" target="_blank">Click here for detail</a></div> 
         </div> 
        </div> 
      </marquee> 
+0

一個好消息 - 'marquee'正在CSS3中復出 - http://www.w3.org/TR/css3-marquee/,所以我們不再需要任何JavaScript hack。 – Anurag 2010-05-23 00:03:27

回答

1

可以使用javascript news ticker script,如果你不想使用marquee標籤。說明在鏈接上。

+0

我需要顯示新聞從下往上滾動不從左到右。想要在div下寫新聞,並想通過JavaScript控制滾動,與我給定的語法相同。 – shamim 2010-05-22 09:53:49